Arunodoy18 opened a new pull request, #37497:
URL: https://github.com/apache/superset/pull/37497

   ### SUMMARY
   
   Fixes an issue where navigating to another dashboard after deleting a 
dashboard
   could trigger an error toast when fetching the dashboard favorite status.
   
   After dashboard deletion, a stale dashboard ID could still be used by the
   frontend to fetch favorite metadata. The backend correctly returns a 404 for
   deleted dashboards, but the frontend previously treated this as an unexpected
   error.
   
   This change:
   - Prevents favorite status fetches for invalid or unmounted dashboards
   - Explicitly handles expected 404 responses without showing a user-facing 
error
   - Preserves existing error handling for real failures (network, permissions, 
5xx)
   - Adds focused regression tests to prevent future regressions
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable.
   
   ### TESTING INSTRUCTIONS
   
   **Manual testing:**
   1. Create a dashboard
   2. Delete the dashboard
   3. Navigate to another dashboard
   4. Verify no error toast appears when the dashboard loads
   
   **Automated testing:**
   - Added unit tests covering:
     - Expected 404 responses after dashboard deletion (no error toast)
     - Non-404 failures (existing error handling preserved)
     - Successful favorite toggle behavior
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: Fixes #32533
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in SIP-59)
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to