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
{{ message }}
Repository navigation
Koa errorHandler should not fail with non number error.code #2785
When an error with a code that is not a number is thrown and caught here, the following error appears
AssertionError [ERR_ASSERTION]: status code must be a number
at Object.set status [as status] (\projectname\node_modules\koa\lib\response.js:86:5)
at \projectname\node_modules\@feathersjs\koa\src\handlers.ts:12:24
at async serve (\projectname\node_modules\koa-static\index.js:53:9)
at async cors (\projectname\node_modules\@koa\cors\index.js:108:16)
It should be checked if the error.code is a number (or a valid status code) before using it.
Activity