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

# Errors

> Common error scenarios and responses

## Error Responses

All error responses will follow the following format with a top-level `error` object and a `4XX` status code.

```json theme={null}
{
  "error": {
    "type": "<error type>",
    "message": "<error message>"
  }
}
```

### Invalid Auth Token

Using an auth token that does not exist or is incorrect will result in a `404` response status.

```bash theme={null}
curl --request GET \
  --url https://api.glideapps.com/tables \
  --header 'Authorization: Bearer INVALID'
```

```json theme={null}
{
  "error": {
    "type": "request_error",
    "message": "API key not found, or duplicate IN****ID"
  }
}
```

### Invalid Stash ID or Serial

Using a stash ID or serial that does not [meet the requirements](../stashing/introduction#stash-ids-and-serials) will result in a `400` response status.

```bash theme={null}
curl --request PUT \
  --url https://api.glideapps.com/stashes/-INVALID-/1 \
  --header 'Authorization: Bearer VALID-API-KEY'
```

```json theme={null}
{
  "error": {
    "type": "request_validation_error",
    "message": "Invalid request params: Stash ID must be 256 characters max, alphanumeric with dashes and underscores, no leading dash or underscore"
  }
}
```

### Invalid Row Data

When adding or updating rows in a table, if the row data does not match the table schema, the API will return a `422` response status.

#### Unkown Column

```json theme={null}
{
    "error": {
        "type": "column_id_not_found",
        "message": "Unknown column ID 'foo'"
    }
}
```

#### Invalid Value for Column

```json theme={null}
{
    "error": {
        "type": "column_has_invalid_value",
        "message": "Invalid value for column 'foo'"
    }
}
```

### Row Not Found

When attempting to update a row that does not exist, the API will return a `404` response status.

```json theme={null}
{
    "error": {
        "type": "row_not_found",
        "message": "Row with ID 'XHz6kF2XSTGi1ADDbryjqw' not found"
    }
}
```
