docs: update exception mapping table in documentation
Clarified the mapping of exceptions to HTTP status codes.
This commit is contained in:
parent
bbbeea6cde
commit
3c72e50adf
1 changed files with 9 additions and 9 deletions
|
|
@ -20,15 +20,15 @@ L'API exprime toutes les réponses d'erreur au format **RFC 7807 / RFC 9457 Prob
|
|||
|
||||
## 2. Matrice de Mapping Exceptions ➔ Codes HTTP
|
||||
|
||||
| Type d'Exception | Couche Origine | Code HTTP | Titre RFC 7807 | Usage & Description |
|
||||
|---|---|---|---|---|
|
||||
| `ValidationException` | `Presentation` | **422** | `Unprocessable Entity` | Échec de validation HTTP (`FormRequest`), champs invalides ou manquants. |
|
||||
| `DomainException` | `Domain` | **422** | `Unprocessable Entity` | Violation d'un invariant ou d'une règle métier au cœur du Domaine (ex: `ValueObject`). |
|
||||
| `ConflictException` | `Domain` / `Application` | **409** | `Conflict` | Conflit d'état métier (ex: compte déjà supprimé, ressource déjà existante/verrouillée). |
|
||||
| `NotFoundException` | `Application` | **404** | `Resource Not Found` | Ressource introuvable par le Use Case / répertoire. |
|
||||
| `HttpExceptionInterface` (403) | `Presentation` | **403** | `Forbidden` | Accès refusé par les politiques d'autorisation HTTP. |
|
||||
| `ThrottleRequestsException` | `Infra` | **429** | `Too Many Requests` | Dépassement du quota de requêtes API (Rate Limiting). |
|
||||
| `Throwable` / `Exception` | Transverse | **500** | `Internal Server Error` | Erreur système non captée (détails masqués hors mode debug). |
|
||||
| Type d'Exception | Couche Origine | Code HTTP | Titre RFC 7807 | Usage & Description |
|
||||
| ------------------------------ | ------------------------ | --------- | ----------------------- | --------------------------------------------------------------------------------------- |
|
||||
| `ValidationException` | `Presentation` | **422** | `Unprocessable Entity` | Échec de validation HTTP (`FormRequest`), champs invalides ou manquants. |
|
||||
| `DomainException` | `Domain` | **422** | `Unprocessable Entity` | Violation d'un invariant ou d'une règle métier au coeur du Domaine (ex: `ValueObject`). |
|
||||
| `ConflictException` | `Domain` / `Application` | **409** | `Conflict` | Conflit d'état métier (ex: compte déjà supprimé, ressource déjà existante/verrouillée). |
|
||||
| `NotFoundException` | `Application` | **404** | `Resource Not Found` | Ressource introuvable par le Use Case / répertoire. |
|
||||
| `HttpExceptionInterface` (403) | `Presentation` | **403** | `Forbidden` | Accès refusé par les politiques d'autorisation HTTP. |
|
||||
| `ThrottleRequestsException` | `Infra` | **429** | `Too Many Requests` | Dépassement du quota de requêtes API (Rate Limiting). |
|
||||
| `Throwable` / `Exception` | Transverse | **500** | `Internal Server Error` | Erreur système non captée (détails masqués hors mode debug). |
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue