fix: error on book fetches

This commit is contained in:
Julien Froidefond
2025-02-28 08:11:32 +01:00
parent bc2ceadb8f
commit 00554d73b0
3 changed files with 3 additions and 1 deletions

View File

@@ -32,7 +32,7 @@ async function getSeriesBooks(seriesId: string, page: number = 1, unreadOnly: bo
return { data: books, series };
} catch (error) {
throw error instanceof Error ? error : new Error("Erreur lors de la récupération des tomes");
throw error instanceof AppError ? error : new AppError(ERROR_CODES.BOOK.PAGES_FETCH_ERROR);
}
}