diff --git a/services/real-time/app/coffee/WebsocketController.coffee b/services/real-time/app/coffee/WebsocketController.coffee index 96a74b9748..470b1f2a52 100644 --- a/services/real-time/app/coffee/WebsocketController.coffee +++ b/services/real-time/app/coffee/WebsocketController.coffee @@ -22,7 +22,7 @@ module.exports = WebsocketController = if !privilegeLevel or privilegeLevel == "" err = new Error("not authorized") - logger.error {err, project_id, user_id, client_id: client.id}, "user is not authorized to join project" + logger.warn {err, project_id, user_id, client_id: client.id}, "user is not authorized to join project" return callback(err) client.join project_id diff --git a/services/real-time/test/unit/coffee/WebsocketControllerTests.coffee b/services/real-time/test/unit/coffee/WebsocketControllerTests.coffee index 965f5d72b2..1ddf4e6359 100644 --- a/services/real-time/test/unit/coffee/WebsocketControllerTests.coffee +++ b/services/real-time/test/unit/coffee/WebsocketControllerTests.coffee @@ -116,7 +116,10 @@ describe 'WebsocketController', -> @callback .calledWith(new Error("not authorized")) .should.equal true - + + it "should not log an error", -> + @logger.error.called.should.equal false + describe "leaveProject", -> beforeEach -> @DocumentUpdaterManager.flushProjectToMongoAndDelete = sinon.stub().callsArg(1)