This error occurs when a request fails on the EMR vendor side, despite being correctly formatted from Leyr's perspective. The status codes vary depending on the specific issue, as the error is forwarded directly from the EMR API.
{
"code": "EMR_ERROR",
"type": "https://docs.leyr.io/api/error-handling/emr_error",
"title": "Internal EMR error",
"status": 401,
"detail": "{\"statusCode\":401,\"message\":\"Unauthorized: An error occurred while attempting to decode the Jwt: Jwt expired at 2022-07-11T09:47:58Z\"}",
"instance": "a7dd57f6-7848-4dc5-b9f8-187fb8ec6275"
}
Authorization header being passed to LeyrLeyr ensures all requests are properly structured and forwarded to the EMR system. This error typically indicates that:
In such cases, the error originates from the EMR side and we will have to look into it together to understand the root-cause better.
To resolve this error:
detail field in the response body. We forward the EMR error message directly, which often contains valuable information about the request issue.x-leyr-client-id and x-leyr-client-secret headers.