Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error handling for batch exports #1984

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jsavell
Copy link
Contributor

@jsavell jsavell commented Jan 23, 2025

When an error occurrs while building the export, the error response gets written directly to the output stream, resulting in a corrupted export file and no indication from the UI that there was an error.

This PR restructures the backend export process to only write the export to the output stream when there are no errors and return an appropriate status code and apiResponse when there are error(s).

The front end has also been updated to only deliver the response as a file download if it's error free.

With these changes, the error response is now able to be caught and displayed by the standard alert handling in the UI.

@cstarcher
Copy link
Member

On review, check how this relates to #1944

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants