chore: update various components and services for improved functionality and consistency, including formatting adjustments and minor refactors

This commit is contained in:
Julien Froidefond
2025-12-07 09:54:05 +01:00
parent 4f5724c0ff
commit 39e3328123
141 changed files with 5292 additions and 3243 deletions

View File

@@ -7,17 +7,16 @@ import { ERROR_CODES } from "@/constants/errorCodes";
*/
export function findHttpStatus(error: unknown): number | null {
if (!(error instanceof AppError)) return null;
// Si c'est une erreur HTTP, récupérer le status
if (error.code === ERROR_CODES.KOMGA.HTTP_ERROR) {
return (error.params as any)?.status || null;
}
// Sinon, chercher récursivement dans originalError
if (error.originalError) {
return findHttpStatus(error.originalError);
}
return null;
}