404 Not Found:
This is by far the most common HTTP status code you can get. It indicates that the URL you used in your request doesn't exist on the API server
401 Unauthorized
This status code means you haven't yet authenticated against the API. The API doesn't know who you are and it won't serve you
403 Forbidden
The forbidden status indicates that you don't have permission to request that URL
400 Bad Request
It implies that you did not correctly format your API request. If no additional error information is given in the response body.
429 Too Many Requests
If you're sending too many requests in a short amount of time, consider throttling them in your client.
500 Internal Server Error
This HTTP status code can mean anything really, but it usually indicates the API server crashed. It could have been caused by something related to your API call.
502 Bad Gateway
This response tells you that the server you were calling wasn't the actual API server, but a gateway or proxy. The proxy server tries to call the API server in your name
503 Service Unavailable
The 503 Service Unavailable Status indicates a server error. Too many API requests were sent and now the API can't handle any more of them.
504 Gateway Timed Out
Like the 502 Bad Gateway status, this response code tells you that the server you were calling is a proxy for the real API server. This time, the problem is the API server's slow response.
501 Not Implemented
The 501 Not Implemented status code is related to the HTTP method you used to request an URL. You can try a different HTTP method to make the request.
Error Status Codes for API
Working Code Edited question July 21, 2023