Part of my rest API calls and external service. This service could, of course, fail for any reason. What's the suggested code that my API should return to the client?
500 Internal Server Error seems inappropriate: why would I return 500 for something that is not "my fault"?
In this specific case:
- the user try to place an order
- If order is invalid, 400 would be returned
- If order is valid, the order is sent to the external API (which may fail)
- The appropriate status code should be returned to the client