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 }; return { data: books, series };
} catch (error) { } 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);
} }
} }

View File

@@ -260,6 +260,7 @@
"SERIES_FETCH_ERROR": "Error fetching series", "SERIES_FETCH_ERROR": "Error fetching series",
"HOME_FETCH_ERROR": "Error fetching home", "HOME_FETCH_ERROR": "Error fetching home",
"SERIES_NO_BOOKS_FOUND": "No books found in the series", "SERIES_NO_BOOKS_FOUND": "No books found in the series",
"BOOK_PAGES_FETCH_ERROR": "Error fetching book pages",
"GENERIC_ERROR": "An error occurred" "GENERIC_ERROR": "An error occurred"
} }

View File

@@ -260,6 +260,7 @@
"SERIES_FETCH_ERROR": "Erreur lors de la récupération des séries", "SERIES_FETCH_ERROR": "Erreur lors de la récupération des séries",
"HOME_FETCH_ERROR": "Erreur lors de la récupération de l'accueil", "HOME_FETCH_ERROR": "Erreur lors de la récupération de l'accueil",
"SERIES_NO_BOOKS_FOUND": "Aucun livre trouvé dans la série", "SERIES_NO_BOOKS_FOUND": "Aucun livre trouvé dans la série",
"BOOK_PAGES_FETCH_ERROR": "Erreur lors de la récupération des pages du livre",
"GENERIC_ERROR": "Une erreur est survenue" "GENERIC_ERROR": "Une erreur est survenue"
} }