Errors
Nylas uses conventional HTTP response codes to indicate the success or failure of an API request.
Status Codes
Status Code | Description |
---|---|
200 OK |
Everything worked as expected. |
202 Not Ready |
The request was valid, but the resource wasn't ready. Retry the request with an exponential backoff. |
400 Bad Request |
The request is malformed or missing a required parameter. |
401 Unauthorized |
Could not verify access credential. No valid API key or access_token was provided. |
402 Request Failed or Payment Required |
The request parameters were valid, but the request failed. Or, a credit card must be added to your organization. |
403 Forbidden |
The request includes authentication errors, blocked developer applications, and cancelled accounts. |
404 Not Found |
The requested item doesn't exist. |
405 Method Not Allowed |
You tried to access a resource with an invalid method. |
410 Gone |
The requested resource has been removed from our servers. |
413 Request Entity Too Large |
Transmitted data value exceeds capacity limit for Send and Files requests. |
418 I'm a teapot. |
💁 |
422 Sending Error |
This response returned during the sending process. |
429 Too Many Requests |
Slow down! If you legitimately require this many requests, please contact support. |
500, 502, 503 Server errors |
An error occurred in the Nylas server. If this persists, see our status page or contact support. |
504 Provider Error |
Please wait and try again. If the problem persists, check with your service provider. |
Empty PUT Request
Sending a PUT request with an empty body will result in a 400 error Empty request body
.
View a full list of possible codes on the List of HTTP Status Codes on Wikipedia or the HTTP Status Codes database.
Error bodies include a JSON object with a standard set of attributes, including an error type
and a human-readable message
string. These are designed to make debugging easier and allow for different handling of scenarios, that produce the same HTTP status code.
Error Type | Details |
---|---|
api_error |
A general API error occurred. |
invalid_request_error |
The request has an invalid format. |
provider_error |
An error with the underlying account's provider has occurred. |
Mail Sync Events
View the logs for Mail Sync status in the Nylas Dashboard under the Mailsync tab.
Events | Description |
---|---|
Failed to parse message. | Unable to parse message due to one or more of the following.
|
Couldn't parse API error response. | JSON object formatting incorrect or incomprehensible. |
Invalid credentails response to sync request; aborting sync. User must reauthenticate. | Settings have changed for Credentials or Server Settings. Resolve the issue using the Invalid Credentials guide. |
Max EAS failures reached, terminating folder sync. | Deactivates sync for the account due to folder hierarchy sync failure. |
Object not found, resyncing folder hierarchy. | Client fetch or change operation no longer has valid server value for CollectionID (EAS folder ID) or ServerID. Examples include deleted items. |
Encountered batch-level sync error; not persisting data for affected folder. | Continues to next batch because of an error while parsing data. |
Resynced more than MAX_UID_RESYNCS in a row. Stopping sync. | With IMAP servers that issue continuous UIVALIDITY errors, Nylas tracks consecutive instances and abandons sync at MAX_UID_RESYNCS value. |
Error authenticating; stopping sync. | Provider gives an authetnication error. Applies to Gmail and Microsoft. |
Folder state loading failed due to missing folder. | Unable to find folder for folder_id indicating a deleted folder for engine. |
Maxed out retries failing to send webhook notification email. | Webhook notification delivery attempted the maximum number of times and failed. |
Error sending webhook notification email. | Confirms failed webhook notification delivery after maximum number of attempts. |