Errors Codes

API error codes are used to communicate specific information about the status and outcome of an API request. They help developers and clients understand what went wrong and why.

Errors Codes

  • 200 OK : The request was successful, and the server has returned the requested data.

  • 201 Created : The request was successful, and a new resource was created.

  • 204 No Content : The request was successful, but there is no data to return .

  • 400 Bad Request : The request was malformed or contains invalid parameters.

  • 401 Unauthorized : The request requires authentication, and the credentials provided are not valid.

  • 403 Forbidden : The client does not have permission to access the requested resource.

  • 404 Not Found : The requested resource could not be found on the server.

  • 405 Method Not Allowed : The HTTP method (GET, POST, PUT, DELETE, etc.) used in the request is not allowed for the given resource.

  • 500 Internal Server Error : An unexpected error occurred on the server.

  • 502 Bad Gateway : The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.

Last updated