Bad Gateway

bad-gateway · 502

The fallback type for a 502 that has no named type, and no route in the API sends it today.

A service the API depends on answering with something it can't use has a named type, such as repo-unavailable for GitHub.

This type adds no members to the ones every error carries.

Common causes

  • A 502 raised without a type of its own reached the error handler.

How to fix the call

  • Retry after a delay: a fault upstream is often brief.
  • Don't change the request because of it, since nothing in the request caused it.

Example response

json
{
  "type": "bad-gateway",
  "title": "Bad Gateway",
  "status": 502,
  "detail": "The upstream service returned an invalid response",
  "requestId": "req-1785231000000-4f7b2c9ae",
  "timestamp": "2026-07-28T09:30:00.000Z",
  "path": "/v1/git/branches",
  "method": "GET",
  "instance": "GET /v1/git/branches",
  "docs": "https://ghaym.me/docs/errors/bad-gateway"
}