# Errors

Errors are [problem details](https://www.rfc-editor.org/rfc/rfc9457) (`application/problem+json`):

```json
{
  "type": "https://developers.sidelined.ch/api/errors#unknown-team",
  "title": "Unknown team",
  "status": 404,
  "detail": "No team \"zurich\". GET /v1/teams lists the 14 slugs."
}
```

The `type` links to the section below; `detail` says what went wrong in this request.

## `bad-parameter`

**400.** A query parameter has a value the endpoint doesn't accept, for example `category=maybe`, `type=injured` or `limit=500`. `detail` names the parameter and the allowed values.

## `bad-cursor`

**400.** The `cursor` isn't one the API issued. Pass `next_cursor` from the previous response exactly as it is, or leave `cursor` out to start from the newest change.

## `unknown-team`

**404.** No club with that slug. `GET /v1/teams` lists the 14 slugs.

## `not-found`

**404.** No such endpoint. The endpoints are in the [reference](/api/reference).

## `not-yet`

**403.** The API opens with the public launch of sidelined.ch.

## `rate-limited`

**429.** More than 60 requests in a minute from your IP address. Wait for the number of seconds in `Retry-After`. To need fewer requests: send `If-None-Match` with the last `ETag` (a `304` is cheap), and don't poll more often than every few minutes; the sources change every 15 to 30 minutes.

## `internal`

**500.** Something went wrong on our side. Try again in a minute; if it persists, write to hello@sidelined.ch.
