attachment_storage_failed

A file could not be stored for delivery. Transient and on our side: nothing was sent, retry with the same `Idempotency-Key`.

HTTP 503Temporarily unavailable. Nothing was done; safe to retry.

When it fires

Before a file is delivered, Repull keeps its own durable copy of it, so the link on the message keeps working after your URL expires. That copy could not be written. The problem is on Repull's side and usually transient; your request and your files are fine. Nothing was sent to the guest.

Response shape

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

{
  "error": {
    "code": "attachment_storage_failed",
    "message": "Attachment 0 could not be stored for delivery. Nothing was sent.",
    "fix": "Nothing was sent. Retry the same request with the same `Idempotency-Key`.",
    "retry_after": 5,
    "docs_url": "https://repull.dev/docs/errors/attachment_storage_failed",
    "request_id": "req_01J5X7Y8Z9ABCDEF12345678"
  }
}

How to fix

  1. Wait `retry_after` seconds (5).
  2. Send exactly the same request again with the same `Idempotency-Key`. Server errors are never stored against a key, so the retry runs fresh, and the key still protects you from sending twice.
  3. If it keeps failing after a few attempts with backoff, email hello@repull.dev with the `request_id`.

Examples

curl

curl -X POST https://api.repull.dev/v1/conversations/164743/messages \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Idempotency-Key: msg-164743-parking-map" \
  -H "Content-Type: application/json" \
  -d '{"message": "Here is the parking map.", "attachments": [{"url": "https://cdn.example.com/parking-map.jpg"}]}'
# → 503 attachment_storage_failed: wait retry_after seconds and send the same command again

TypeScript

async function sendWithRetry(body: unknown, key: string, attempts = 4) {
  for (let i = 0; i < attempts; i++) {
    const res = await fetch('https://api.repull.dev/v1/conversations/164743/messages', {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.REPULL_API_KEY}`,
        'Content-Type': 'application/json',
        'Idempotency-Key': key, // same key on every attempt
      },
      body: JSON.stringify(body),
    })
    if (res.status !== 503) return res
    const { error } = await res.json()
    await new Promise((r) => setTimeout(r, (error.retry_after ?? 2 ** i) * 1000))
  }
  throw new Error('Attachment storage kept failing')
}

If you're an AI agent

Transient failure storing a file on Repull's side. Nothing was sent. Wait retry_after seconds and resend the identical request with the same Idempotency-Key.

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

AI