Closed axelo closed 8 years ago
I'm down for this. Care to make a PR? The only thing I would change is 503
to a more generic 500
as that's a "catch-all" internal error handler and the service is likely still available, but that particular request causes it to wig out.
Nice! I agree that 500 is better suited. I'll be back with a PR.
Enhancement.
Today if one have to check if there was an error response when converting we need to parse the whole response content and check if the error field is present.
An easier way would be to respond with another http status code other than 200 (Ok), 400 (Bad Request) for example.
A suggestion for a future PR:
Set status to 400 (Bad Request) at:
Set status 503 (Service Unavailable) at: