---
title: "BadGatewayResponseError"
---

Bad Gateway - Provider/upstream API failure


## Fields

| Field                                                                                  | Type                                                                                   | Required                                                                               | Description                                                                            | Example                                                                                |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `error`                                                                                | [components.BadGatewayResponseErrorData](../components/badgatewayresponseerrordata.mdx) | :heavy_check_mark:                                                                     | Error data for BadGatewayResponse                                                      | \{<br/>"code": 502,<br/>"message": "Provider returned error"<br/>}                      |
| `openrouter_metadata`                                                                  | Dict[str, *Nullable[Any]*]                                                             | :heavy_minus_sign:                                                                     | N/A                                                                                    |                                                                                        |
| `user_id`                                                                              | *OptionalNullable[str]*                                                                | :heavy_minus_sign:                                                                     | N/A                                                                                    |                                                                                        |