Skip to content

Commit 344dfde

Browse files
committed
Return the error responses. They were being caught and not preserved
1 parent 46c34f3 commit 344dfde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/webapp/app/routes/api.v1.waitpoints.http-callback.$waitpointFriendlyId.callback.$hash.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ export async function action({ request, params }: ActionFunctionArgs) {
4545
});
4646

4747
if (!waitpoint) {
48-
throw json({ error: "Waitpoint not found" }, { status: 404 });
48+
return json({ error: "Waitpoint not found" }, { status: 404 });
4949
}
5050

5151
if (!verifyHttpCallbackHash(waitpoint.id, hash, waitpoint.environment.apiKey)) {
52-
throw json({ error: "Invalid URL, hash doesn't match" }, { status: 401 });
52+
return json({ error: "Invalid URL, hash doesn't match" }, { status: 401 });
5353
}
5454

5555
if (waitpoint.status === "COMPLETED") {

0 commit comments

Comments
 (0)