Re: [I] fix(ux): no error feedback when create/update mutations fail across all pages [apisix-dashboard]
Baoyuantop commented on issue #3356: URL: https://github.com/apache/apisix-dashboard/issues/3356#issuecomment-4118704362 When the API returns a 4xx/5xx error: 1. The Axios interceptor executes first → a red Mantine notification pops up displaying error_msg or message. 2. Then the Promise is rejected → the TanStack Query mutation enters an error state. 3. Because there is no onError handler, the mutation does not perform any additional processing, but the user has already seen the error notification. Please report bugs based on actual behavior, not just code inferences. -- 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 create/update mutations fail across all pages [apisix-dashboard]
Baoyuantop closed issue #3356: fix(ux): no error feedback when create/update mutations fail across all pages URL: https://github.com/apache/apisix-dashboard/issues/3356 -- 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 create/update mutations fail across all pages [apisix-dashboard]
vanshaj2023 commented on issue #3356: URL: https://github.com/apache/apisix-dashboard/issues/3356#issuecomment-4114436095 Hi @Baoyuantop , I found this while exploring the codebase every `useMutation` call across all pages has only an `onSuccess` handler but no `onError`. 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]
[I] fix(ux): no error feedback when create/update mutations fail across all pages [apisix-dashboard]
vanshaj2023 opened a new issue, #3356:
URL: https://github.com/apache/apisix-dashboard/issues/3356
### Issue description
Every create and update mutation across the entire dashboard has only an
`onSuccess` handler but no `onError` handler. When an API call fails (network
error, 403, 422, 500), the form silently stops responding the submit button
un-freezes and nothing happens. Users have no idea what went wrong.
**Example (routes/add.tsx:46):**
```ts
const postRoute = useMutation({
mutationFn: (d: RoutePostType) => postRouteReq(req, produceRoute(d)),
async onSuccess(res) {
notifications.show({ message: t('info.add.success', ...), color: 'green'
});
await navigate(res);
},
// missing: onError handler
});
```
### Expected behavior
When a create or update operation fails, an error notification should appear
informing the user that the operation was unsuccessful so they can retry or
investigate the issue.
### How to Reproduce
1. Navigate to any resource page (e.g. Routes, Services, Upstreams)
2. Fill in the form and click the Add/Save button
3. Simulate a failure disable network, or have the backend return a 500/403
4. Observe: the submit button un-freezes, nothing happens, no error message
shown
### Screenshots
_No response_
### Environment
- apisix version (cmd: `apisix version`):
- OS (cmd: `uname -a`):
- OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
- etcd version, if have (cmd: run `etcd --version`):
- apisix-dashboard version, if have:
- Browser version, if have:
### Additional context
_No response_
--
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]
