internal_error

Something went wrong on our side. Safe to retry with backoff.

HTTP 500Repull failed to handle the request.

When it fires

Something failed inside Repull. The request was authenticated, the params looked right, but execution did not complete. This always means a problem on our side, not yours. Sub-cases include:

  • A transient database error.
  • A downstream channel (Airbnb, Booking.com, your PMS) returning unexpected data we could not parse.
  • A race condition surfaced by an unusually large workspace.
  • An unhandled edge case in a freshly-shipped endpoint.

Response shape

Every Repull error follows the same envelope. The code is stable and safe to switch on.

{
  "error": {
    "code": "internal_error",
    "message": "<human-readable explanation of what went wrong>",
    "docs_url": "https://repull.dev/docs/errors/internal_error"
  }
}

How to fix

  1. Capture the request id from the response headers (X-Request-Id). You will need this to file a report.
  2. Retry once after 1 second. Most internal errors are transient.
  3. If the second attempt also fails, retry with exponential backoff (up to 3 attempts total).
  4. If it still fails, email hello@repull.dev with the request id, the endpoint, and the time of the request. Include the response body if you have it.
  5. For mission-critical writes, wrap the call with an idempotency key — that way you can safely retry without risk of double side effects.

Common gotchas

  • Always safe to retry with an idempotency key. Without one, retrying a write may create duplicates if the original request actually succeeded but the response was lost in transit.
  • internal_error never includes a stack trace in the response body — that information is in our logs, indexed by request id.
  • If you see a sustained burst of internal_error across multiple endpoints, check status.repull.dev before filing a ticket.

Examples

curl

# Retry once after a 1s pause
curl https://api.repull.dev/v1/listings -H "Authorization: Bearer sk_test_YOUR_KEY"
# {"error": {"code": "internal_error", "message": "..."}}

sleep 1
curl https://api.repull.dev/v1/listings -H "Authorization: Bearer sk_test_YOUR_KEY"

TypeScript

import { Repull } from '@repull/sdk'
import { randomUUID } from 'crypto'

const repull = new Repull({ apiKey: process.env.REPULL_KEY! })

async function safeCreate(body: any) {
  const idemKey = randomUUID()
  for (let attempt = 0; attempt < 3; attempt++) {
    try {
      return await repull.reservations.create(body, { idempotencyKey: idemKey })
    } catch (err: any) {
      if (err.code !== 'internal_error') throw err
      if (attempt === 2) {
        console.error('Repull internal error after 3 attempts. request_id:', err.requestId)
        throw err
      }
      await new Promise(r => setTimeout(r, 1000 * Math.pow(2, attempt)))
    }
  }
}

If you're an AI agent

This is a Repull-side failure, not a request shape issue. Wait 1 second and retry. If the second attempt fails too, do exponential backoff. After 3 attempts, surface the request_id from the response headers to the user and ask them to file a ticket.

Hit an error that isn't covered? Email hello@repull.dev with the request id from the response headers.

AI