How to get downstream api (which are defined in yml) status code? #3578
-
I have multiple sources in my .meshrc.yml but one of them is down(not working for the moment), usually I am expecting the 404 or some error status code but the mesh endpoint gives me 200 with some exception**(invalid json response body at https://my-enpoint/graphql reason: Syntax error)**. Is there any way that I can say this is 404 for the final response? Basically trying to put monitoring/resilenace stuff in place and for this need the downstream API's exact status code. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Even in case of errors, GraphQL APIs return 200 with |
Beta Was this translation helpful? Give feedback.
Even in case of errors, GraphQL APIs return 200 with
errors
inside the response body. This would be the same for almost all GraphQL Server implementations.https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md#status-codes