Previously, if updateTrayMenu() failed after a successful main operation (like sorting, adding, or updating providers), the entire operation would appear to fail with a misleading error message, even though the core functionality had already succeeded. This resulted in false negative feedback where: - Backend data was successfully updated - Frontend UI was successfully refreshed - Tray menu failed to update - User saw "operation failed" message (incorrect) Changes: - Wrap updateTrayMenu() calls in nested try-catch blocks - Log tray menu failures separately with descriptive messages - Ensure main operation success is reported accurately - Prevent tray menu failures from triggering main operation error handlers Files modified: - src/hooks/useDragSort.ts (drag-and-drop sorting) - src/lib/query/mutations.ts (add/delete/switch mutations) - src/hooks/useProviderActions.ts (update provider) This fixes the bug introduced in PR #179 and prevents similar issues across all provider operations.
3.1 KiB
3.1 KiB