---
title: "500 Internal server error"
description: "Something broke inside QuotaStack. The call may or may not have gone through."
---

# 500 Internal server error

`https://api.quotastack.io/errors/internal`

Something broke inside QuotaStack. The call may or may not have gone through.

## Why it happened

- A QuotaStack bug, or a database that was briefly out of reach.
- The access-control service was down. That failure lands here, not on a `403` page.

## How to fix it

1. Send the call again with the same `Idempotency-Key`. A replay is safe, and a double charge is not.
2. Read the balance or the record afterwards, to see whether the first call landed.
3. Tell support what you sent and when, if it keeps happening.

### Example response 500

```json
{
  "type": "https://api.quotastack.io/errors/internal",
  "title": "Internal Server Error",
  "status": 500,
  "detail": "Failed to grant credits."
}
```

## Which calls return this

- [`GET /v1/customers`](/docs/api/customers#listCustomers)
- [`POST /v1/customers`](/docs/api/customers#createCustomer)
- [`GET /v1/customers/{id}`](/docs/api/customers#getCustomer)
- [`PATCH /v1/customers/{id}`](/docs/api/customers#updateCustomer)
- [`DELETE /v1/customers/{id}`](/docs/api/customers#deleteCustomer)
- [`GET /v1/customer-by-external-id/{external_id}`](/docs/api/customers#getCustomerByExternalId)
- [`PATCH /v1/customer-by-external-id/{external_id}`](/docs/api/customers#updateCustomerByExternalId)
- [`DELETE /v1/customer-by-external-id/{external_id}`](/docs/api/customers#deleteCustomerByExternalId)
- [`GET /v1/customers/{customer_id}/credits`](/docs/api/credits#getCustomerCredits)
- [`POST /v1/customers/{customer_id}/credits/grant`](/docs/api/credits#grantCustomerCredits)
- [`POST /v1/customers/{customer_id}/credits/adjust`](/docs/api/credits#adjustCustomerCredits)
- [`GET /v1/customers/{customer_id}/credits/history`](/docs/api/credits#listCustomerCreditsHistory)
- [`GET /v1/customers/{customer_id}/overage`](/docs/api/credits#getCustomerOverage)
- [`GET /v1/customer-by-external-id/{external_id}/credits`](/docs/api/credits#getCustomerCreditsByExternalId)
- [`POST /v1/customer-by-external-id/{external_id}/credits/grant`](/docs/api/credits#grantCustomerCreditsByExternalId)
- [`POST /v1/customer-by-external-id/{external_id}/credits/adjust`](/docs/api/credits#adjustCustomerCreditsByExternalId)
- [`GET /v1/customer-by-external-id/{external_id}/credits/history`](/docs/api/credits#listCustomerCreditsHistoryByExternalId)
- [`GET /v1/customer-by-external-id/{external_id}/overage`](/docs/api/credits#getCustomerOverageByExternalId)
- [`GET /v1/entitlements/check`](/docs/api/entitlements#checkEntitlement)
- [`POST /v1/usage`](/docs/api/usage#recordUsage)
- [`POST /v1/usage/batch`](/docs/api/usage#recordUsageBatch)
- [`POST /v1/imports/customers`](/docs/api/imports#importCustomer)
- [`POST /v1/subscriptions`](/docs/api/subscriptions#createSubscription)
- [`GET /v1/audit-log`](/docs/api/audit-log#listAuditLog)

## See also

- [Idempotency](/docs/concepts/idempotency)
