User1593233503 posted
All - I am consuming a third party Web API in my web application. The business requirement is to show an outage message when the API is down/unavailable. I am trying to find out what is the response code I should be looking for to say the API is down/unavailable.
I did some research and found that any status code starting with 4 is due to issues at the client side and any status starting with 5 tells there is an issue at the server side.(https://www.w3.org/Protocols/HTTP/HTRESP.html)
Do I need to show the outage message for all the responses with the code starting with 5? To me that doesn't seem correct because, for example, in case of "500 - Internal Server Error" the request reached server but it encountered
some issue while processing it. Can you please help in this?