Status and Error Codes

Not everything goes according to plan. To handle these issues gracefully, Chargetrip uses default GraphQL errors with extensions. Learn more about this below.

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.