What happened
Something went wrong on the server that was not caused by your request. This is not a problem with your integration — it is a problem on our side.
{
"error": {
"type": "api_error",
"code": "INTERNAL_ERROR",
"message": "Unexpected error",
"status": 500,
"doc_url": "https://done.mintlify.app/errors/internal-error",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
The request_id field
Every INTERNAL_ERROR response includes a request_id UUID. This ID is logged on our servers alongside the full error. If you contact support, include the request_id so we can find the exact failure in our logs.
How to handle
Implement exponential back-off with jitter. A reasonable starting point:
async function withRetry<T>(fn: () => Promise<T>, maxAttempts = 4): Promise<T> {
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
try {
return await fn()
} catch (err) {
if (attempt === maxAttempts) throw err
const delay = Math.min(100 * 2 ** attempt + Math.random() * 100, 5000)
await new Promise((resolve) => setTimeout(resolve, delay))
}
}
throw new Error('unreachable')
}
If INTERNAL_ERROR persists after several retries, stop retrying and surface the error to the user.
Continuing to hammer a failing endpoint will not help and may make things worse.
If the error persists, reach out with:
- The
request_id from the response
- The endpoint and request body (redact any sensitive values)
- The approximate time the error occurred