New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response validation not working on status codes 400 and up #469
Comments
@rosengrenen could you provide your use case as well as the result you expect and the actual result. |
The use case would be attaching a json object with extra information about the error, along with the status code. For status codes 2xx (and 3xx) if the response does not match the schema an error is shown instead, but when doing the same with status codes 400+ the response is not checked, thus being able to send anything. |
Hi, |
I’ll take a look and get this fixed. If u don’t mind, it will be great if someone can provide a canonical example spec and basic server that causes the error |
Fixed in v4.10.6 |
Hi, response validation does not seem to work on status codes 400+, and I tracked it down to
src/framework/modded.express.mung.ts:35
. I am wondering why this is the case, since it's not mentioned in the docs (I think) and had me confused for a bit. Is this a design choice or am I missing something here?The text was updated successfully, but these errors were encountered: