Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SMTP timeout by trycatching usecase #1442

Merged
merged 2 commits into from
Jun 19, 2024
Merged

Conversation

lkostrowski
Copy link
Member

@lkostrowski lkostrowski commented Jun 19, 2024

Scope of the PR

SHOPX-855

Related issues

Checklist

@lkostrowski lkostrowski requested review from a team as code owners June 19, 2024 08:54
@lkostrowski lkostrowski requested a review from Droniu June 19, 2024 08:54
Copy link

vercel bot commented Jun 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
saleor-app-smtp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2024 9:05am
7 Ignored Deployments
Name Status Preview Comments Updated (UTC)
saleor-app-avatax ⬜️ Ignored (Inspect) Visit Preview Jun 19, 2024 9:05am
saleor-app-cms ⬜️ Ignored (Inspect) Visit Preview Jun 19, 2024 9:05am
saleor-app-data-importer ⬜️ Ignored (Inspect) Visit Preview Jun 19, 2024 9:05am
saleor-app-emails-and-messages ⬜️ Ignored (Inspect) Visit Preview Jun 19, 2024 9:05am
saleor-app-klaviyo ⬜️ Ignored (Inspect) Visit Preview Jun 19, 2024 9:05am
saleor-app-products-feed ⬜️ Ignored (Inspect) Visit Preview Jun 19, 2024 9:05am
saleor-app-search ⬜️ Ignored (Inspect) Visit Preview Jun 19, 2024 9:05am

Copy link

changeset-bot bot commented Jun 19, 2024

🦋 Changeset detected

Latest commit: 251fed7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
smtp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR


captureException(e);

return res.status(500).send("Failed to execute");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return res.status(500).send("Failed to execute");
return res.status(500).json({message: "SMTP app failed to handle gift card send webhook"});

Suggestion: can you send json here - it will be visible in Saleor logs as it requires JSON response

@lkostrowski lkostrowski merged commit 5fbf043 into main Jun 19, 2024
19 checks passed
@lkostrowski lkostrowski deleted the fix-smtp-error-handling branch June 19, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants