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

# Errors

Sohar uses standard HTTP response codes to indicate whether an API request succeeded. A response with a `4xx` status code indicates an issue with the request. A response with a `5xx` status code indicates an issue processing the request.

## Response Format

Error responses can include an `error` value and the request parameter that caused the error:

```json theme={null}
{
  "error": "invalid_request_error",
  "param": "patient.firstName"
}
```

Some endpoints also return your optional `id` value to help identify the request. Fields that do not apply to an error are omitted.

## Response Codes

| Code | Description |
| - | - |
| `400` | The request is invalid. Check the `param` value, when present, to identify the invalid field. |
| `401` | The access token is missing, invalid, or expired. See [Authentication](/api-reference/api-reference/authentication). |
| `403` | The authenticated account does not have access to the requested resource or operation. |
| `404` | The requested resource was not found. |
| `429` | The request exceeded an account quota or [rate limit](/api-reference/api-reference/rate-limits). |
| `500` | Sohar encountered an unexpected error while processing the request. |
| `503` | Sohar is temporarily unable to process the request. |

## Handling Errors

Correct the request before retrying a `4xx` response, except for `429`. Retry `429`, `500`, and `503` responses with exponential backoff and jitter. When retrying a supported create request, reuse its [idempotency key](/api-reference/api-reference/idempotency).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.