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

api_downloadFile returns json on non-existent file #6274

Closed
robnagler opened this issue Sep 4, 2023 · 0 comments · Fixed by #6300
Closed

api_downloadFile returns json on non-existent file #6274

robnagler opened this issue Sep 4, 2023 · 0 comments · Fixed by #6300

Comments

@robnagler
Copy link
Member

{"state":"error","error":"Simulation library file \"sample.tif\" does not exist"}

The source of the problem is lib_file_abspath raises a UserAlert. However, it doesn't know the context. It should probably throw a NotFound, but that will break the application for other GET operations.

I think the solution the problem is to render it as a server error if it is a GET, and include the error message in the rendered HTML.

robnagler pushed a commit that referenced this issue Sep 4, 2023
robnagler pushed a commit that referenced this issue Sep 12, 2023
- restructured sirepo.reply to avoid early json serialization
- restructured srunit to handle replies more consistently between websocket and http
- Fix #6291 restructured job_api to simplify parameters
- Fix #6293 clean up stateless/fulCompute to pass correct parameters
- Fix #6288 api_serverStatus calls asyncio.sleep
- Fix #6157 removed exportJupyterNotebook and cruft in create_archive
- Fix #6274 avoid returning json for GET on errors, include detail in HTML
- HTML is always properly rendered (formally didn't include doctype)
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 a pull request may close this issue.

1 participant