From 3c72e50adf704157bd3e808773cbb91fae3862be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Fri, 14 Aug 2026 11:33:45 +0200 Subject: [PATCH] docs: update exception mapping table in documentation Clarified the mapping of exceptions to HTTP status codes. --- documentation/Exceptions.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/documentation/Exceptions.md b/documentation/Exceptions.md index e71eb8b..913d675 100644 --- a/documentation/Exceptions.md +++ b/documentation/Exceptions.md @@ -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). | ---