Status and Error Codes

Sometimes things do not go as planned. To manage these situations effectively, Chargetrip uses default GraphQL errors with error extensions. Error codes help developers identify specific issues, provide meaningful feedback to users, and make debugging and troubleshooting easier. Additionally, these error codes can be used to create translatable errors for internationalization and localization.

API Response Codes

Our API uses the following response status codes, as defined in the RFC 2616 and RFC 6568.

200The request succeeded. The client can read the body.
201The request is created. A new resource will be created.
202The request is accepted. The client has to wait until it’s done processing.
204The request has succeeded but returns no message body.
304Not modified.
400The request could not be understood by the server due to malformed syntax.
401The request requires authentication.
403The server understood the request, but is refusing to fulfill it.
404The requested resource could not be found.

API Error Objects

When an error occurs, the Chargetrip API returns a generic GraphQL error with an extension. An error description can be found inside the extension object.