Skip to content

Commit

Permalink
stop catching error in stripe worker
Browse files Browse the repository at this point in the history
  • Loading branch information
RafidMuhymin committed Mar 28, 2024
1 parent e4b6794 commit 086cfd0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/workers/dilmahtea-me-stripe/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const handlePOST = async (request, env, ctx) => {
validatedData = await getValidatedData(rawPaymentData, CMSData, env);

if (validatedData.errors) {
return reply(validatedData, 400);
console.log(validatedData);

return reply({ success: false, error: "Bad Request" }, 400);
}

const request_headers = Object.fromEntries(request.headers);
Expand Down Expand Up @@ -122,8 +124,6 @@ const handlePOST = async (request, env, ctx) => {
);
};

handlePOST.catchError = true;

export default createModuleWorker({
pathname: "/",
methods: { POST: handlePOST },
Expand Down

0 comments on commit 086cfd0

Please sign in to comment.