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

Handle promise rejection in upgrade notification #2092

Merged
merged 2 commits into from
May 8, 2024

Conversation

frandiox
Copy link
Contributor

@frandiox frandiox commented May 8, 2024

I noticed that the upgrade notification was showing unhandled promise rejections. This catches the errors and print them as warnings.

Before:

image

After:

image

@frandiox frandiox requested review from juanpprieto and a team May 8, 2024 00:53
Copy link
Contributor

shopify bot commented May 8, 2024

Oxygen deployed a preview of your fd-handle-error-upgrade branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
vite ✅ Successful (Logs) Preview deployment Inspect deployment May 8, 202412:53 AM
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment May 8, 202412:53 AM
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment May 8, 202412:53 AM
subscriptions ✅ Successful (Logs) Preview deployment Inspect deployment May 8, 202412:53 AM
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment May 8, 202412:54 AM
optimistic-cart-ui ✅ Successful (Logs) Preview deployment Inspect deployment May 8, 202412:54 AM

Learn more about Hydrogen's GitHub integration.

Comment on lines +1094 to +1100
} catch (error) {
const abortError = error as AbortError;
renderWarning({
headline: abortError.message,
body: abortError.tryMessage ?? undefined,
});
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only relevant part of the diff.

@michenly michenly merged commit 2c11ca3 into main May 8, 2024
13 checks passed
@michenly michenly deleted the fd-handle-error-upgrade branch May 8, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants