From 76fdca1f025b312b9dbfd4c704f42e51e008554d Mon Sep 17 00:00:00 2001 From: Camille TJHOA Date: Wed, 18 Feb 2026 15:06:10 +0100 Subject: [PATCH] feat: add HTTP Gone error --- apps/content/docs/openapi/error-handling.md | 1 + packages/client/src/error.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/apps/content/docs/openapi/error-handling.md b/apps/content/docs/openapi/error-handling.md index 5a6eed639..c78be1a10 100644 --- a/apps/content/docs/openapi/error-handling.md +++ b/apps/content/docs/openapi/error-handling.md @@ -21,6 +21,7 @@ By default, oRPC maps common error codes to standard HTTP status codes: | NOT_ACCEPTABLE | 406 | Not Acceptable | | TIMEOUT | 408 | Request Timeout | | CONFLICT | 409 | Conflict | +| GONE | 410 | Gone | | PRECONDITION_FAILED | 412 | Precondition Failed | | PAYLOAD_TOO_LARGE | 413 | Payload Too Large | | UNSUPPORTED_MEDIA_TYPE | 415 | Unsupported Media Type | diff --git a/packages/client/src/error.ts b/packages/client/src/error.ts index 8e9dd1c9b..99c612f69 100644 --- a/packages/client/src/error.ts +++ b/packages/client/src/error.ts @@ -35,6 +35,10 @@ export const COMMON_ORPC_ERROR_DEFS = { status: 409, message: 'Conflict', }, + GONE: { + status: 410, + message: 'Gone', + }, PRECONDITION_FAILED: { status: 412, message: 'Precondition Failed',