Skip to content

Commit

Permalink
Merge pull request #438 from maykinmedia/issue/#429-400-error
Browse files Browse the repository at this point in the history
:fix: - fix: fixed the 400 error
  • Loading branch information
Xaohs authored Oct 18, 2024
2 parents d5f738f + 15ee662 commit 6f74f5e
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ export async function destructionListDestroyAction({
request,
}: ActionFunctionArgs) {
const { payload } = await request.json();
await destroyDestructionList(payload.uuid);
try {
await destroyDestructionList(payload.uuid);
} catch (e: unknown) {
if (e instanceof Response) {
return await (e as Response).json();
}
throw e;
}
return redirect("/");
}

Expand Down

0 comments on commit 6f74f5e

Please sign in to comment.