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

Show blast errors when possible #692

Merged
merged 2 commits into from Oct 10, 2023
Merged

Conversation

tadast
Copy link
Collaborator

@tadast tadast commented Oct 10, 2023

When you enter a malformed query, it fails with a generic error message. Bubble up BLAST's stderr to be shown in the error modal when possible.

This is what it looks like after the change:
image

I think this half-way solves #691

When you enter a malformed query, it fails with a generic error
message. Bubble up BLAST's stderr to be shown in the error modal
when possible.
@ghost
Copy link

ghost commented Oct 10, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

When an issue with a user query or configuration occurs, we were
just raising an exception and the sinatra's error block was
returning 500 error page. When we know the shape of the error
and build a JSON response for it, it's more likely to be a 4**
type of error, so default to 422 for a status in such cases.

This is not ideal, but an improvement when it comes to HTTP status
semantics and also helps manage errors when Sequenceserver is deployed
to a server i.e. passenger can be configured to intercept 500 pages
yet 4** ones would still be handled by the app and display useful
error messages to the user.
@yannickwurm yannickwurm merged commit df07c4b into wurmlab:master Oct 10, 2023
4 of 5 checks passed
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.

None yet

2 participants