improved error logging

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-26 16:24:11 +02:00
parent d2c36e71be
commit 6fb03530df
6 changed files with 50 additions and 4 deletions
+20
View File
@@ -17,6 +17,16 @@ export const getBorrowableItems = async (
});
if (!response.ok) {
if (response.status === 503) {
return {
data: null,
status: "error",
title: "Service deactivated",
description:
"The loan service is currently deactivated. Please try again later.",
};
}
return {
data: null,
status: "error",
@@ -60,6 +70,16 @@ export const createLoan = async (
});
if (!response.ok) {
if (response.status === 503) {
return {
data: null,
status: "error",
title: "Service deactivated",
description:
"The loan service is currently deactivated. Please try again later.",
};
}
return {
data: null,
status: "error",