# Errori interni del server

**HTTP status:** `500 Internal Server Error`

**Content-Type:** `application/problem+json`

**type:** `https://truescreen.redocly.app/errors/server-error`

Questo errore viene restituito quando si verifica un errore interno non previsto. Il problema non dipende dalla richiesta del client.

## Codici errore associati

| Code | Detail | Esempio / note |
|  --- | --- | --- |
| `TS-000` | Internal server error. | Errore generico non previsto (`type`: `.../server-error`). |
| `TS-014` | Digital signature error.. | Vedi [Fallimento elaborazione certificazione](#fallimento-elaborazione-certificazione) sotto (`type`: `.../server-error`). |


## Fallimento elaborazione certificazione

Si presenta quando la **creazione** della certificazione è andata a buon fine ma l’**elaborazione asincrona** non si è completata con successo. Vale per **`GET /v1/certifications/{reportId}`** e per la callback **`webhook_url`** quando l’elaborazione termina in errore.

### Esempio di risposta

```json
{
  "type": "https://truescreen.redocly.app/errors/server-error",
  "title": "Certification processing error",
  "status": 500,
  "detail": "Digital signature error.",
  "code": "TS-014"
}
```

### Come risolvere

1. Considerare il job di certificazione fallito; non attendere una risposta `200` di completamento per lo stesso tentativo.
2. Se opportuno, **creare una nuova certificazione** e monitorare di nuovo `GET` o il webhook.
3. Se l’errore persiste, contattare il supporto TrueScreen con `code: TS-014` e il `reportId` dai log di integrazione.


## Esempio: errore interno del server (TS-000)

```json
{
  "type": "https://truescreen.redocly.app/errors/server-error",
  "title": "Internal server error",
  "status": 500,
  "detail": "Internal server error.",
  "code": "TS-000"
}
```

## Note

- In casi estremi (es. timeout di API Gateway, errore a monte prima dell'handler) la risposta potrebbe essere un 5xx **senza corpo** `application/problem+json`: il client dovrebbe gestire anche risposte 5xx non strutturate.
- Se l'errore persiste, contatta il supporto TrueScreen.