eschutho opened a new pull request, #35718: URL: https://github.com/apache/superset/pull/35718
## SUMMARY Follow-up to #35584. Adds comprehensive error handling tests for the export functionality. ## BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A - Tests only ## TEST PLAN Added 7 new test cases covering error scenarios: - **Network errors and logging** - Verifies errors are logged via `logging.error()` - **404 errors when resource not found** - Tests handling of missing resources - **Empty response from server** - Validates empty blob handling - **Download failure with cleanup** - Ensures blob URLs are revoked even on click errors - **Malformed Content-Disposition header** - Tests graceful fallback to default filename - **Missing headers object** - Validates behavior when headers are absent - **Empty IDs array edge case** - Tests exporting with no IDs All tests ensure: 1. The `done()` callback is always called (for UI cleanup like hiding spinners) 2. Resources are properly cleaned up (blob URLs revoked) 3. Errors are logged appropriately 4. Fallback behavior works correctly Run tests with: \`\`\`bash npm test -- src/utils/export.test.ts \`\`\` ## ADDITIONAL INFORMATION - This PR adds test coverage only, no functional changes - All tests verify the error handling added in #35584 - Ensures robust error handling for the CSP-compliant export implementation 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
