1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 13:29:41 +02:00

fix(app/edge-stack): UI notification on creation error (#325)

This commit is contained in:
LP B 2025-01-17 20:33:01 +01:00 committed by GitHub
parent 154ca9f1b1
commit cab667c23b
2 changed files with 20 additions and 8 deletions

View file

@ -10,8 +10,13 @@ import {
import { notifyError } from '@/portainer/services/notifications';
/**
* @deprecated use withGlobalError
* `onError` and other callbacks are not supported on react-query v5
* @deprecated for `useQuery` ONLY. Use `withGlobalError`.
*
* `onError` and other callbacks are not supported on `useQuery` in react-query v5
*
* Using `withError` is fine for mutations (`useMutation`)
*
* see https://tkdodo.eu/blog/breaking-react-querys-api-on-purpose
*/
export function withError(fallbackMessage?: string, title = 'Failure') {
return {