[misc] OError.tag all the errors in async contexts

See the docs of OError.tag:
https://github.com/overleaf/o-error#long-stack-traces-with-oerrortag
(currently at 221dd902e7bfa0ee92de1ea5a3cbf3152c3ceeb4)

I am tagging all errors at each async hop. Most of the controller code
 will only ever see already tagged errors -- or new errors created in
 our app code. They should have enough info that we do not need to tag
 them again.
This commit is contained in:
Jakob Ackermann
2020-08-24 10:12:06 +01:00
parent c7b9dadd16
commit 537e97be73
8 changed files with 63 additions and 58 deletions
@@ -1464,8 +1464,8 @@ describe('WebsocketController', function () {
return this.client.disconnect.called.should.equal(true)
})
it('should log an error', function () {
return this.logger.error.called.should.equal(true)
it('should not log an error', function () {
return this.logger.error.called.should.equal(false)
})
return it('should call the callback with the error', function () {