Internal Errors on Nylas APIs

Hello everyone!
I am facing errors on various Nylas APIs on my email client application.

Specifically in the send email Python SDK.

My code is the following

try:
       message = client.messages.send(
            grant_id,
            request_body=request_body
        )

        return message.data
except Exception as e:
        error_logger = logging.getLogger("error_logger")
        error_logger.error(f"Error Logger: send_nylas_email: Exception in email sending: {e}: {str(e)}")
        return e

The exception I am getting is the following
e = NylasApiError(‘error unmarshaling graph draft response’)
e.type = ‘internal_error’
e.dict = {‘request_id’: ‘6333320352-714068b6-253f-49bd-aeea-631b053c1a0a’, ‘status_code’: 500, ‘type’: ‘internal_error’, ‘provider_error’: None}

From this part of Nylas website Nylas errors and HTTP status codes | Nylas Docs Nylas internal_errors suggest that we contact administrator.

I am also facing issues in the folder APIs.

I will respond to this topic with further information regarding the folders.

Regarding the folders API, I am not using Python SDK but an HTTP request according to these specs Nylas v3 Email, Calendar, and Contacts API docs | Nylas Docs

I have tested this with multiple grant ids and the response for url https://api.eu.nylas.com/v3/grants/{grant_id}/folders

is either this

{
    "request_id": "8984311688-02cbb906-d77c-43bc-9d51-f470eedaaca0",
    "error": {
        "type": "timeout_error",
        "message": "Request timed out. Please try with a smaller page size or use a narrow filter so that the request can be completed within the timeout period. For more information, please go to https://developer.nylas.com/docs/api/errors/500-response/#error-504---provider-error."
    }
}

or this

{
    "request_id": "4429812573-3644398e-390f-4aab-b85b-ff2a680e9e84",
    "error": {
        "type": "provider_error",
        "message": "Not Found",
        "provider_error": {}
    }
}

or this

{
    "request_id": "4153455158-cc9e6cc1-66a6-4a24-b83d-4e4e49ea97a1",
    "error": {
        "type": "partial_success_error",
        "message": "One or more items could not be fetched.",
        "provider_error": {
            "error": {
                "code": "",
                "message": ""
            }
        }
    }
}

Note: using a limit parameter does not fix the issue.

Furthermore I have not checked all of Nylas APIs but I suspect that the issue would be in other places as well (besides email sending and folders).

On an unrelated note, Nylas chat ticket creation feature does not work either.

Hi @gpapidas sorry about the late response - can you confirm if you found a fix or are still facing this issue? I can help you accordingly