fix: handle missing Komga configuration gracefully by returning an empty array instead of an error in API routes

This commit is contained in:
Julien Froidefond
2025-10-17 08:37:08 +02:00
parent b8af5e2468
commit bf94c29bc6
6 changed files with 418 additions and 784 deletions

View File

@@ -33,6 +33,9 @@ export abstract class BaseApiService {
authHeader: config.authHeader,
};
} catch (error) {
if (error instanceof AppError && error.code === ERROR_CODES.KOMGA.MISSING_CONFIG) {
throw error;
}
console.error("Erreur lors de la récupération de la configuration:", error);
throw new AppError(ERROR_CODES.KOMGA.MISSING_CONFIG, {}, error);
}