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

Improve handling of nonexistent workflow version submission #171

Closed
simleo opened this issue Nov 5, 2021 · 2 comments
Closed

Improve handling of nonexistent workflow version submission #171

simleo opened this issue Nov 5, 2021 · 2 comments
Labels
enhancement New feature or request high-priority

Comments

@simleo
Copy link
Member

simleo commented Nov 5, 2021

If someone tries to submit a nonexistent workflow version from WorkflowHub, e.g.:

{'identifier': '138',
 'name': 'sars-cov-2-consensus-from-variation/COVID-19-CONSENSUS-CONSTRUCTION',
 'version': '999'}

We currently reply with a misleading error message:

{'detail': 'RO Crate processing exception',
 'type': 'about:blank',
 'extra_info': {'exception': '[400] Bad request: Downloaded RO-crate has bad zip format'},
 'title': 'Bad Request',
 'status': 400,
 'instance': 'https://api.lifemonitor.eu/registries/b556d831-a393-43bd-8047-98505b7fc20c/workflows'}

The problem is that WorkflowHub does not reply to such requests with an error, so we end up trying to unzip an HTML page.

@simleo
Copy link
Member Author

simleo commented Nov 5, 2021

Finn:

There is a workaround, where you can pass the HTTP header: Accept: application/json and you will get a 400 error with a JSON response in case of error, but still get the binary zip file if it is valid.

@kikkomep
Copy link
Member

fixed in #377

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high-priority
Projects
None yet
Development

No branches or pull requests

3 participants