pms_error
The PMS could not be reached or failed. Nothing was confirmed. Retry with the SAME `Idempotency-Key`.
When it fires
The PMS could not be reached, timed out, or failed while Repull was creating, changing, cancelling or quoting a booking. Nothing was confirmed.
This answer is not stored against your Idempotency-Key, so a retry with the same key runs for real. Because the key is also sent to the PMS as the booking's reference, a booking that did go through is found instead of made twice.
Response shape
Every Repull error follows the same envelope. The code is stable and safe to switch on.
{
"error": {
"code": "pms_error",
"message": "Smoobu could not be reached to create the reservation: timeout of 30000ms exceeded",
"fix": "Nothing was changed. Retry with the same idempotency key.",
"docs_url": "https://repull.dev/docs/errors/pms_error",
"request_id": "req_01J5X7Y8Z9ABCDEF12345678",
"provider": "smoobu"
}
}How to fix
- Retry with the SAME `Idempotency-Key`, with backoff (for example 2s, 4s, 8s).
- If a retry answers `409 pms_duplicate`, the first attempt did book — look it up, do not create it again.
- If the PMS keeps failing, check the PMS's own status page before retrying further.
Common gotchas
Do not confuse it with reservation_created_in_pms_only, the other 502 on these endpoints, which must never be retried.
Examples
curl
# Same key on every retry curl -X POST https://api.repull.dev/v1/reservations \ -H "Authorization: Bearer sk_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 9f1c2f7e-4a3b-4f2e-9c8d-1b6a0e5d7c31" \ -d @booking.json
TypeScript
const key = crypto.randomUUID() // generated once, reused on every retry
for (let attempt = 0; attempt < 4; attempt++) {
const res = await fetch('https://api.repull.dev/v1/reservations', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.REPULL_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': key,
},
body: JSON.stringify(booking),
})
const body = await res.json()
if (res.status !== 502 || body.error?.code !== 'pms_error') return body
await new Promise(r => setTimeout(r, 2000 * 2 ** attempt))
}If you're an AI agent
The PMS failed or could not be reached; nothing was confirmed. Retry with the SAME Idempotency-Key and backoff. Never switch to a new key for this retry.
Related
- Error reference — the full table of error codes
- Using Repull from AI agents — patterns for handling errors in agent loops
- Creating reservations
- Idempotency
Hit an error that isn't covered? Email hello@repull.dev with the request id from the response headers.