offer_action_failed
A pre-approval, special offer or request response failed for a reason Repull could not classify. Retry with the same `Idempotency-Key`.
When it fires
A pre-approval, special offer, offer withdrawal, or accept or decline of a booking request failed for a reason Repull could not match to a more specific code. message says which action and what was reported. It is returned as 502, or as the server error status that was reported.
Response shape
Every Repull error follows the same envelope. The code is stable and safe to switch on.
{
"error": {
"code": "offer_action_failed",
"message": "Pre-approval failed: <what was reported>",
"fix": "Retry with the same `Idempotency-Key`. If it keeps failing, quote the `request_id`.",
"docs_url": "https://repull.dev/docs/errors/offer_action_failed",
"request_id": "req_01J5X7Y8Z9ABCDEF12345678"
}
}How to fix
- Retry the same request with the same `Idempotency-Key`, backing off between attempts. Server errors are never stored against a key, so the retry runs fresh and still cannot act twice.
- Before retrying an accept or an offer, you can check whether it landed after all: `GET /v1/reservations/{id}` or `GET /v1/inquiries?conversation_id={id}&status=all`.
- If it keeps failing, email hello@repull.dev with the `request_id`.
Examples
curl
curl -X POST https://api.repull.dev/v1/conversations/164743/pre-approval \ -H "Authorization: Bearer sk_live_YOUR_KEY" \ -H "Idempotency-Key: preapprove-164743" # → 502 offer_action_failed: retry the same command after a short wait
TypeScript
async function withRetry(doCall: () => Promise<Response>, attempts = 4) {
for (let i = 0; i < attempts; i++) {
const res = await doCall() // same Idempotency-Key on every attempt
if (res.status < 500) return res
await new Promise((r) => setTimeout(r, 2 ** i * 1000 + Math.random() * 250))
}
throw new Error('offer action kept failing')
}If you're an AI agent
An offer or request action failed for an unclassified reason. Retry with the same Idempotency-Key and backoff; if it persists, report the request_id.
Related
- Error reference — the full table of error codes
- Using Repull from AI agents — patterns for handling errors in agent loops
- Inquiries & booking requests
- Idempotency Keys
Hit an error that isn't covered? Email hello@repull.dev with the request id from the response headers.