Firsty

Search...

Search...

API errors

bad_gateway

A network the request depends on failed to complete it.

502application/problem+json

What it means

The request was valid, but a network operation it needs failed. The failure is usually transient.

A retry with the same X-Idempotency-Key within 48 hours returns this same response rather than running the operation again.

502 · application/problem+json
{
  "type": "https://developers.firsty.app/errors/bad_gateway",
  "title": "Bad gateway",
  "status": 502,
  "detail": "Provisioning failed for eSIM 8944000000000000001. Please retry or select another eSIM.",
  "code": "bad_gateway"
}

How to handle it

  1. For a write, read the resource's state first, then retry with a fresh X-Idempotency-Key if the operation did not take effect.

  2. Back off exponentially if it keeps failing, and contact Firsty support with the X-Request-Id response header value.