---
title: "Errors"
description: "Every error code, its HTTP status, whether to retry, and what to do next."
canonical_url: https://groundsocial.dev/docs/errors
---
# Errors

> Every error code, its HTTP status, whether to retry, and what to do next.

> ## Agent Instructions
> The Groundsocial REST API is at https://api.groundsocial.dev (OpenAPI: https://groundsocial.dev/openapi.json). Set yourself up with https://groundsocial.dev/SKILL.md; the MCP server is https://api.groundsocial.dev/mcp. Every docs page is Markdown at its URL plus `.md`; the index is https://groundsocial.dev/llms.txt.

**Every error has the same shape.** Branch on `code`, never on `message`. Codes are a public contract: new ones are added, none are renamed.

| Field | What it is |
| --- | --- |
| `code` | Stable and machine-readable. |
| `message` | What happened, for a person. |
| `hint` | What to do next. |
| `docs_url` | This page, at the code’s anchor. |
| `retryable` | Whether retrying the same request can help. |
| `request_id` | Also in the `x-request-id` header. Quote it to support. |
| `details` | Extra fields for some codes, such as the signup challenge. |

## The retry rule

Retry only when `retryable` is `true`. Wait `Retry-After` seconds when the header is present (every 429 has it), otherwise back off exponentially from one second, and give up after a few tries. Never resend a `400` unchanged. A `402` is about money: buy, top up or ask your human; don’t loop. Failed calls are refunded, so a retry never double-charges.

## Every code

| Code | HTTP | Retry? | Action |
| --- | --- | --- | --- |
| [`invalid_request`](#invalid_request) | 400 | No | Fix the input named in `message`; never resend it unchanged. Nothing was charged. |
| [`unauthorized`](#unauthorized) | 401 | No | Send a key as `Authorization: Bearer <key>`. No key? Sign up (agents: `POST /v1/agent/signup`). |
| [`invalid_api_key`](#invalid_api_key) | 401 | No | The key is wrong or revoked. Check it in the dashboard. Don’t sign up again to get past this. |
| [`invalid_session`](#invalid_session) | 401 | No | The dashboard session expired. Sign in again. |
| [`payment_required`](#payment_required) | 402 | No | This call needs payment: use a key, or pay the offer in the 402 (MPP or x402). |
| [`payment_failed`](#payment_failed) | 402 | No | The payment credential was refused: invalid, expired, already used or not settled. Get a fresh 402 offer and pay that; nothing was charged. |
| [`insufficient_credits`](#insufficient_credits) | 402 | No | The balance is too low. Buy a pack or top up; retrying won’t help. |
| [`spend_cap_reached`](#spend_cap_reached) | 402 | No | This key hit its daily or monthly cap. Wait for it to reset, or ask the owner to raise it. |
| [`forbidden`](#forbidden) | 403 | No | You can’t do this: the account is suspended, or your role doesn’t allow it. |
| [`not_found`](#not_found) | 404 | No | No such route or object. Check the path against the API reference. |
| [`method_not_allowed`](#method_not_allowed) | 405 | No | Wrong HTTP method for this path. See the API reference. |
| [`conflict`](#conflict) | 409 | No | The request clashes with the current state. Read it again, then decide. |
| [`already_claimed`](#already_claimed) | 409 | No | This account was already claimed. The key keeps working; nothing to do. |
| [`invalid_code`](#invalid_code) | 400 | No | The sign-in code is wrong or expired. Request a new one. |
| [`challenge_required`](#challenge_required) | 428 | Yes | Answer the question in `error.details.challenge` and POST again with `challenge_token` and `answer`. |
| [`challenge_failed`](#challenge_failed) | 428 | Yes | Wrong or expired answer. Answer the new question in this response. |
| [`challenge_locked`](#challenge_locked) | 429 | Yes | Too many questions or wrong answers from this network. Wait `Retry-After` seconds. |
| [`signup_limited`](#signup_limited) | 429 | Yes | Too many signups from this network today. Use your existing key, or wait `Retry-After` seconds. |
| [`signup_disabled`](#signup_disabled) | 503 | No | Signup is switched off. Stop and tell your human; don’t try another signup URL. |
| [`authorization_pending`](#authorization_pending) | 400 | Yes | The person hasn’t approved the device login yet. Keep polling at `interval`. |
| [`slow_down`](#slow_down) | 400 | Yes | Polling too fast. Add 5 seconds to your interval. |
| [`access_denied`](#access_denied) | 400 | No | The person declined. Stop polling. |
| [`expired_token`](#expired_token) | 400 | No | The device code expired. Start the login again. |
| [`target_not_found`](#target_not_found) | 404 | No | The subreddit, post or user doesn’t exist, or was deleted. Refunded. |
| [`target_private`](#target_private) | 403 | No | The target is private, banned or quarantined. Refunded; don’t retry. |
| [`rate_limited`](#rate_limited) | 429 | Yes | Too many requests. Wait `Retry-After` seconds, then retry. |
| [`upstream_unavailable`](#upstream_unavailable) | 503 | Yes | Reddit isn’t answering. Retry with backoff; nothing was charged. |
| [`upstream_timeout`](#upstream_timeout) | 504 | Yes | Reddit took too long. Retry with backoff; nothing was charged. |
| [`internal_error`](#internal_error) | 500 | Yes | Our fault. Retry once, then contact support with the `request_id`. |

## By code

### `invalid_request`

HTTP 400. Not retryable. Fix the input named in `message`; never resend it unchanged. Nothing was charged.

### `unauthorized`

HTTP 401. Not retryable. Send a key as `Authorization: Bearer <key>`. No key? Sign up (agents: `POST /v1/agent/signup`).

### `invalid_api_key`

HTTP 401. Not retryable. The key is wrong or revoked. Check it in the dashboard. Don’t sign up again to get past this.

### `invalid_session`

HTTP 401. Not retryable. The dashboard session expired. Sign in again.

### `payment_required`

HTTP 402. Not retryable. This call needs payment: use a key, or pay the offer in the 402 (MPP or x402).

### `payment_failed`

HTTP 402. Not retryable. The payment credential was refused: invalid, expired, already used or not settled. Get a fresh 402 offer and pay that; nothing was charged.

### `insufficient_credits`

HTTP 402. Not retryable. The balance is too low. Buy a pack or top up; retrying won’t help.

### `spend_cap_reached`

HTTP 402. Not retryable. This key hit its daily or monthly cap. Wait for it to reset, or ask the owner to raise it.

### `forbidden`

HTTP 403. Not retryable. You can’t do this: the account is suspended, or your role doesn’t allow it.

### `not_found`

HTTP 404. Not retryable. No such route or object. Check the path against the API reference.

### `method_not_allowed`

HTTP 405. Not retryable. Wrong HTTP method for this path. See the API reference.

### `conflict`

HTTP 409. Not retryable. The request clashes with the current state. Read it again, then decide.

### `already_claimed`

HTTP 409. Not retryable. This account was already claimed. The key keeps working; nothing to do.

### `invalid_code`

HTTP 400. Not retryable. The sign-in code is wrong or expired. Request a new one.

### `challenge_required`

HTTP 428. Retryable. Answer the question in `error.details.challenge` and POST again with `challenge_token` and `answer`.

### `challenge_failed`

HTTP 428. Retryable. Wrong or expired answer. Answer the new question in this response.

### `challenge_locked`

HTTP 429. Retryable. Too many questions or wrong answers from this network. Wait `Retry-After` seconds.

### `signup_limited`

HTTP 429. Retryable. Too many signups from this network today. Use your existing key, or wait `Retry-After` seconds.

### `signup_disabled`

HTTP 503. Not retryable. Signup is switched off. Stop and tell your human; don’t try another signup URL.

### `authorization_pending`

HTTP 400. Retryable. The person hasn’t approved the device login yet. Keep polling at `interval`.

### `slow_down`

HTTP 400. Retryable. Polling too fast. Add 5 seconds to your interval.

### `access_denied`

HTTP 400. Not retryable. The person declined. Stop polling.

### `expired_token`

HTTP 400. Not retryable. The device code expired. Start the login again.

### `target_not_found`

HTTP 404. Not retryable. The subreddit, post or user doesn’t exist, or was deleted. Refunded.

### `target_private`

HTTP 403. Not retryable. The target is private, banned or quarantined. Refunded; don’t retry.

### `rate_limited`

HTTP 429. Retryable. Too many requests. Wait `Retry-After` seconds, then retry.

### `upstream_unavailable`

HTTP 503. Retryable. Reddit isn’t answering. Retry with backoff; nothing was charged.

### `upstream_timeout`

HTTP 504. Retryable. Reddit took too long. Retry with backoff; nothing was charged.

### `internal_error`

HTTP 500. Retryable. Our fault. Retry once, then contact support with the `request_id`.

## Examples

Error body:

```json
{
  "error": {
    "code": "target_not_found",
    "message": "r/thisdoesnotexist was not found.",
    "hint": "Check the name. Nothing was charged.",
    "docs_url": "https://groundsocial.dev/docs/errors#target_not_found",
    "retryable": false,
    "request_id": "req_01J…"
  }
}
```

_Canonical HTML: https://groundsocial.dev/docs/errors_

## Site Navigation

### Global Hub
- [Home](https://groundsocial.dev/index.md)
- [Pricing](https://groundsocial.dev/pricing.md)
- [Endpoints](https://groundsocial.dev/endpoints.md)
- [For agents](https://groundsocial.dev/agents.md)
- [Docs](https://groundsocial.dev/docs.md)
- [Compare](https://groundsocial.dev/compare.md)
- [Changelog](https://groundsocial.dev/changelog.md)
- [llms.txt](https://groundsocial.dev/llms.txt)
- [Agent skill](https://groundsocial.dev/SKILL.md)

### On This Topic
- [Groundsocial docs](https://groundsocial.dev/docs.md)
- [Quickstart](https://groundsocial.dev/docs/quickstart.md)
- [Authentication](https://groundsocial.dev/docs/authentication.md)
- [Credits and payments](https://groundsocial.dev/docs/payments.md)
- [Rate limits](https://groundsocial.dev/docs/rate-limits.md)
- [Data freshness and caching](https://groundsocial.dev/docs/freshness.md)
- [MCP server](https://groundsocial.dev/docs/mcp.md)
- [SKILL.md, llms.txt and Markdown twins](https://groundsocial.dev/docs/skill.md)
- [CLI](https://groundsocial.dev/docs/cli.md)
- [TypeScript SDK](https://groundsocial.dev/docs/sdk.md)
- [PRAW and snoowrap](https://groundsocial.dev/docs/praw.md)
- [Legal and compliance](https://groundsocial.dev/docs/compliance.md)
- [API reference](https://groundsocial.dev/docs/api.md)

## Structured data

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://groundsocial.dev/"},{"@type":"ListItem","position":2,"name":"Docs","item":"https://groundsocial.dev/docs"},{"@type":"ListItem","position":3,"name":"Errors","item":"https://groundsocial.dev/docs/errors"}]}
```
