Skip to content

Commit 00c21c4

Browse files
Xaohssvenvandescheur
authored andcommitted
🥅 - fix: added error handling
1 parent 2a5e638 commit 00c21c4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

frontend/src/pages/settings/settings.action.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ export async function settingsAction({ request, params }: ActionFunctionArgs) {
2929
async function patchArchiveConfigAction({ request }: ActionFunctionArgs) {
3030
const { payload } = await request.json();
3131
const _payload = payload as ArchiveConfiguration;
32-
await patchArchiveConfiguration(_payload);
32+
33+
try {
34+
await patchArchiveConfiguration(_payload);
35+
} catch (e: unknown) {
36+
if (e instanceof Response) {
37+
return await (e as Response).json();
38+
}
39+
throw e;
40+
}
3341
return null;
3442
}

0 commit comments

Comments
 (0)