You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't understand why headers are removed if you throw an error?
I'm sure there is a reason.
concrete example: if I use cors and jwt middleware. domain is authorize to make a request but try to access a unauthorize api, why Access-control...headers should be removed?
The only way is for now, to catch the error(401) and set ctx.status = 401.
But if i want to centralize my errors, i 'd like to use the app.on('error') for example and not add before all other middeleware something like that:
https://github.com/koajs/koa/blob/v2.x/lib/context.js#L121
I don't understand why headers are removed if you throw an error?
I'm sure there is a reason.
concrete example: if I use cors and jwt middleware. domain is authorize to make a request but try to access a unauthorize api, why
Access-control...
headers should be removed?The only way is for now, to catch the error(401) and set ctx.status = 401.
But if i want to centralize my errors, i 'd like to use the app.on('error') for example and not add before all other middeleware something like that:
The text was updated successfully, but these errors were encountered: