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

# M500: Internal server error

> M500 is returned when the gateway encounters an unhandled internal error.

## What you saw

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
[🦚 Manifest M500] Something broke on our end. Try again in a moment.
See https://manifest.build/llm-gateway/docs/errors/M500
```

## Why it happened

The gateway hit an unexpected error while handling your request. Usually that's a database hiccup, a downstream provider returning something unparseable, or a real bug. The actual stack trace is logged server-side, but masked in the response so we don't leak internals.

## How to fix it

1. Retry. Most M500s are transient.
2. On a self-hosted install, check the backend logs for the real stack trace.
3. If it sticks around, [open an issue](https://github.com/mnfst/llm-gateway/issues) with the timestamp and your harness name. That's enough for us to correlate it to the server log.

## Related

* [Self-hosted setup](/llm-gateway/docs/llm-gateway/docs/self-hosted)
* [Fallback](/llm-gateway/docs/llm-gateway/docs/llm-gateway#fallback)
* [All error codes](/llm-gateway/docs/llm-gateway/docs/errors)
