Re: [I] fix(ux): no error feedback when delete request fails in DeleteResourceBtn [apisix-dashboard]
Baoyuantop commented on issue #3343: URL: https://github.com/apache/apisix-dashboard/issues/3343#issuecomment-4118798553 The Axios response interceptor (lines 63-94 in req.ts) already handles most errors globally. I think that's enough. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] fix(ux): no error feedback when delete request fails in DeleteResourceBtn [apisix-dashboard]
Baoyuantop closed issue #3343: fix(ux): no error feedback when delete request fails in DeleteResourceBtn URL: https://github.com/apache/apisix-dashboard/issues/3343 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] fix(ux): no error feedback when delete request fails in DeleteResourceBtn [apisix-dashboard]
vanshaj2023 commented on issue #3343:
URL:
https://github.com/apache/apisix-dashboard/issues/3343#issuecomment-4114060933
Hi @Baoyuantop,
here's my plan to fix, adding a `.catch()` that shows an error notification:
```ts
.catch(() => {
notifications.show({
message: t('info.delete.error', { name }),
color: 'red',
});
})
```
A few questions I want to ask
1. Error message detail, should we show a generic "Delete failed" or extract
the error message from the API response (e.g. `error.response?.data?.message`)?
The API sometimes returns meaningful reasons like "resource is in use".
2. onSuccess failure, if onSuccess itself throws (e.g. a failed navigation),
should that also trigger the error notification, or only the DELETE request
failure?
3. i18n keys, I'll add `info.delete.error` across all 5 locales. Should the
wording be "Failed to delete {name}" or something else?
Happy to open a PR once we align on these!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [I] fix(ux): no error feedback when delete request fails in DeleteResourceBtn [apisix-dashboard]
vanshaj2023 commented on issue #3343: URL: https://github.com/apache/apisix-dashboard/issues/3343#issuecomment-4101412808 Hi @Baoyuantop , I noticed this while exploring the codebase. Should I go ahead and fix it? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
