-
Notifications
You must be signed in to change notification settings - Fork 361
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
refactor: [M3-6852] - Remove global error interceptors #10850
refactor: [M3-6852] - Remove global error interceptors #10850
Conversation
Coverage Report: ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice clean up! 🧼
packages/manager/src/features/Linodes/MigrateLinode/MigrateLinode.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this, @hkhalil-akamai! The migrate and support errors are looking good and opening the support ticket dialog at the component level.
There's one minor bit of clean up from a change I made in a previous PR due to the casting - we could revert it now with better type safety.
Description 📝
Today the Cloud Manager uses a global error interceptor to add links to
APIError
s that call for users to open a support ticket. This interceptor introduces type unsafety (since it necessitates a cast) and reduces flexibility in displaying error messages.#10684 made progress towards reducing our reliance on this interceptor by using the
<ErrorMessage />
component, which formats errors at the component level. This PR completes that refactor by removing the two remaining cases where errors were being intercepted:dc_migrations_disabled
customer tagMigrateLinode
componentChanges 🔄
request.tsx
and associated utilities (interceptAPIError.ts
)ErrorMessage
componentErrorMessage
in a couple of missing places (GenerateFirewallDialog
,MigrateLinode
)Target release date 🗓️
9/17
How to test 🧪
In all of the following instances, displayed errors should include a link to the
SupportTicketDialog
. For example:dc_migrations_disabled
tag to your account and attempt to migrate a LinodeAPIError
s otherwise appear as expected across the app