is it possible to change http status code for class-validator errors? #832
Unanswered
Vakintoshka
asked this question in
Q&A
Replies: 1 comment 1 reply
-
TypeGraphQL create a GraphQL schema, not a HTTP server, so it depends on server you use (mercurius, apollo, express-graphql). Go to their docs to find out how to format errors or send different http codes. TypeGraphQL throws |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys, I do typegraph with apollo and currently it returns me http status 200 on invalid request.
Example - I do @isemail validation and send value which is not email. Http status 200 and error is in the body. Is it any way how to change it to the 400 code?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions