Hello i want to understand if i as a server am acting as a middleman between the client and another server , what should i return to the client when any of the requests from me to the other server fails?
Currently i am sending the client a generic 500
with a message containing the original message of the other server:
Other server message: 401: Something
My server message: 500: Other server: 401 Something
Is it ok , or how should the middleman behave ?
Found another post on the subject
5xx codes are for telling the client that even though the request was fine, the server has had some kind of problem fulfilling the request.
Every other 5xx than 500 does not fit your situation => You're doing right :)