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

# internal_error

> Error: an unexpected server error occurred

# internal\_error

<Info>HTTP Status: **500 Internal Server Error**</Info>

## Example response

```json theme={null}
{
  "error": {
    "code": "internal_error",
    "message": "An unexpected error occurred",
    "docs_url": "https://docs.avatcado.com/errors/internal_error"
  },
  "meta": {
    "request_id": "550e8400-e29b-41d4-a716-446655440000"
  }
}
```

## What happened?

Something went wrong on Avatcado's side. This is never caused by your request input. Common causes:

* A transient infrastructure issue
* An unhandled edge case in our code

## How to fix

1. **Retry the request**. Most internal errors are transient and resolve within seconds.
2. **Check the `request_id`**. If the error persists, include it when contacting support so we can trace the issue.
3. **Don't change your request**. This error is not caused by your input, so modifying your request won't help.

## Catching this error with the SDKs

<CodeGroup>
  ```typescript @avatcado/node theme={null}
  import Avatcado, { AvatcadoError } from '@avatcado/node';

  const avatcado = new Avatcado('avat_live_your_api_key');
  const { data, error } = await avatcado.vat.validate({ vatNumber: '...' });

  if (error instanceof AvatcadoError) {
    console.log(`${error.code}: ${error.message}`);
    console.log(error.docsUrl);
  }
  ```

  ```python Python theme={null}
  from avatcado import Avatcado, AvatcadoError

  avatcado = Avatcado("avat_live_your_api_key")

  try:
      result = avatcado.vat.validate("...")
  except AvatcadoError as e:
      print(f"{e.code}: {e.message}")
      print(e.docs_url)
  ```
</CodeGroup>

## Related errors

* [`upstream_unavailable`](/errors/upstream_unavailable): Upstream service (VIES, HMRC, BFS, BRREG, or ABR) is unreachable (different from an internal Avatcado error)
