[Bug] koa-context-validator
is throwing an error rather than returning a 400 response
#20
Closed
1 task done
What happened?
Not quite a bug but more of an unexpected behavior.
The koa-context-validator is throwing an error on the server when the request's query/body is not validated.
It would be better to return it to the client in the form of a
400
(bad argument) response error, with the Joi's error description as the response message.But the middleware ecosystem of Koya is quite poor and rarely used.
I propose to either:
Reproduction
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: