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

# Internal Server Error

> Unexpected server error

**HTTP Status:** 500

```json theme={null}
{
  "code": "internal_server_error",
  "message": "An unexpected error occurred. Please try again.",
  "request_id": "req_3f6a2c1e-9b0d-4e7a-8c21-5d1f0a9b7e42",
  "doc_url": "https://docs.poof.bg/errors/internal-server-error"
}
```

## Reasons and How to Fix

### Unexpected Server Error

Something went wrong on our end. This is not your fault, and the request is not billed.

**To fix:**

1. Wait a moment and retry the request
2. Check [status.poof.bg](https://status.poof.bg) for any ongoing incidents
3. Contact support if the issue persists

### Retry Strategy

```python theme={null}
import time
import os
from poof import Poof, ServerError

client = Poof(api_key=os.environ["POOF_API_KEY"])

def process_with_retry(image_path, max_retries=3):
    for attempt in range(max_retries):
        try:
            return client.remove_background(image_path)
        except ServerError as e:
            if e.code == "internal_server_error" and attempt < max_retries - 1:
                time.sleep(2 ** attempt)  # 1s, 2s, 4s
            else:
                raise
```

## Service Status

Check [status.poof.bg](https://status.poof.bg) for:

* Current service status
* Ongoing incidents
* Scheduled maintenance

## Need Help?

Please contact us at [support@poof.bg](mailto:support@poof.bg) with:

* Your `request_id`
* The time of the error
* What you were trying to do

We take server errors seriously and will investigate promptly.


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