> ## Documentation Index
> Fetch the complete documentation index at: https://openrouter.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 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                               |                                                                       |
