|
ctx.response.status = error.code || 500 |
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.
feathers/packages/koa/src/handlers.ts
Line 12 in d886f33
When an error with a code that is not a number is thrown and caught here, the following error appears
It should be checked if the error.code is a number (or a valid status code) before using it.