# upstream_failed

> 502 Upstream failed. A service BlueBot depends on failed.

| Status              | Code              | Retry?             |
| ------------------- | ----------------- | ------------------ |
| 502 Upstream failed | `upstream_failed` | Yes, after waiting |

## What it means

A service BlueBot depends on failed.

## Common causes

- File storage or email didn’t answer.

## What to do

A service BlueBot depends on failed. Try again shortly.

## Can I retry it?

Yes, after waiting. Wait the seconds in `retry_after` (or the `Retry-After` header) when the answer has them, otherwise back off from a second or two. With the same `Idempotency-Key`, a retried send never sends twice.

## What the answer looks like

The answer, `502`:

```json
{
  "error": {
    "code": "upstream_failed",
    "message": "File storage didn’t answer.",
    "hint": "A service BlueBot depends on failed. Try again shortly.",
    "doc_url": "https://usebluebot.com/docs/errors/upstream_failed",
    "request_id": "req_1Hq2LxW9cVbN3mKpRtYs0a"
  }
}
```

Branch on `code`, which never changes. `message` and `hint` are written for people and may be reworded. Quote `request_id` when you write to support.

## Related

- [Errors](https://usebluebot.com/docs/errors): the envelope and every code
- [Idempotency](https://usebluebot.com/docs/concepts/idempotency): retrying without sending twice
- [Limits](https://usebluebot.com/docs/limits): every cap and what happens when you reach it
