internal_error
HTTP/1.1 500 Internal Server Error{ "error": { "type": "internal_error", "code": "internal_error", "message": "An unexpected error occurred while processing your request.", "docs_url": "https://docs.patomic.dev/errors/internal-error", "request_id": "…", "suggestion": "Retry after a short delay using exponential backoff. If the problem persists, include the `request_id` from this response when contacting support." }}What it means
Section titled “What it means”Patomic’s server hit an exception it didn’t anticipate. The request is not your fault.
The internal details (stack trace, exception name) are not leaked to clients — they go to Sentry and structured logs, correlated by request_id.
How to handle
Section titled “How to handle”- Retry. Exponential backoff with jitter, max ~5 attempts. Most 5xx errors are transient (a brief network blip, a Cloudflare colo restart, a D1 connection cycle).
- If retries don’t clear it, report. Include the
request_id— Patomic can correlate it to the exact stack trace in Sentry.
Reference retry pattern
Section titled “Reference retry pattern”async function withRetry5xx<T>(fn: () => Promise<Response>): Promise<Response> { for (let i = 0; i < 5; i++) { const res = await fn(); if (res.status < 500) return res; const wait = Math.min(2 ** i * 100, 5000) + Math.random() * 200; await new Promise((r) => setTimeout(r, wait)); } throw new Error("five 5xx in a row — Patomic is having a bad time");}Patomic’s target uptime is 99.95% (≈ 21.9 minutes of downtime per month). Status page coming in Phase 4. Until then, sustained 5xx → contact pedrotengelmann+security@gmail.com with request_ids.