I want to integrate bugsnag into my project.
For that you have to implement the global Koa error handler: app.on('error', bugsnag.koaHandler)
but the handler is never called.
{ BadRequestError: error thrown
at Object.throw (/home/rafael/coding/Office/Scatch/code/server/tsoa/node_modules/koa/lib/context.js:93:11)
at /home/rafael/coding/Office/Scatch/code/server/tsoa/tests/fixtures/koa/routes.ts:2021:22
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7) message: 'error thrown' }
✓ returns error if thrown in controller
I tried to fix it with app.silent = true or app.on('error', () => {}) in the file /
tests/fixtures/koa/server.ts, but the error message is appearing nevertheless and the error handler is never called.
Hi,
I want to integrate bugsnag into my project. For that you have to implement the global Koa error handler:
app.on('error', bugsnag.koaHandler)
but the handler is never called.https://github.com/koajs/koa/wiki/Error-Handling
Is there any other way to implement that?
For my local project I found a workaround: https://github.com/RafaelKr/tsoa/commit/5cdb2768db374525466d085032e1276951a40023 But now one of the Koa tests outputs an error:
I tried to fix it with
app.silent = true
orapp.on('error', () => {})
in the file / tests/fixtures/koa/server.ts, but the error message is appearing nevertheless and the error handler is never called.Edit: I think the error output stems from /tests/fixtures/koa/server.ts#L33, somehow I overread that while testing.
In my local app the error handler is called when I do the following: