Skip to content

Comments

Show blast errors when possible#692

Merged
yannickwurm merged 2 commits intowurmlab:masterfrom
tadast:tt/better-error
Oct 10, 2023
Merged

Show blast errors when possible#692
yannickwurm merged 2 commits intowurmlab:masterfrom
tadast:tt/better-error

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
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