✦ Continue with Google
AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Silent Failures In Destructive Mutations Within Analytics Buckets

Several delete mutations in the AnalyticsBuckets module swallow errors via empty onError callbacks, causing silent UI failures and state desync when deletions fail due to network issues, RLS, or timeouts.

highConfidence 95%TanStack React Query

Origin Analysis

The root cause is the use of empty onError callbacks (() => {}) in TanStack React Query mutations, which suppress error propagation and prevent user notification. The underlying design flaw is that TanStack Query does not enforce error handling, allowing developers to unintentionally ignore failures, especially in destructive operations.
1. Navigate to Analytics Buckets / Iceberg Namespace UI. 2. Trigger a deletion for a Namespace Table, Publication, or Destination Pipeline. 3. Simulate network failure or a 500 API response. 4. Observe that no error toast appears; the UI remains unchanged while the deletion actually fails.

Fixing Code Block

Edge Case Audit

If a global error handler is already configured, adding explicit toasts may cause duplicate notifications. Ensure the toast library (sonner, react-hot-toast, etc.) is properly imported and matches the project's version; a mismatch may cause runtime errors. The error object might not always be a standard Error instance, so consider using optional chaining (error?.message) or a type guard. High-frequency deletion attempts could spawn multiple toasts, leading to UI clutter; consider throttling or deduplicating. For rollback, revert the onError callbacks to their original empty functions and remove the added toast import to avoid build errors.

Ecosystem Topology