mountetna / timur

Data browser for biologists
GNU General Public License v2.0
3 stars 6 forks source link

Intercepting magma errors. #182

Closed jasondcater closed 6 years ago

jasondcater commented 6 years ago

Fixes card #181

This adds a wrapper around the Magma requests to catch Magma errors and it also adds UI code to display the errors appropriately.

graft commented 6 years ago

The server side method is doing essentially the same thing as the status_check method on the magma client, it might be worth investigating why this is leaking 500s and fixing it there instead of having two redundant methods.

Also, something I have been thinking about is that both client and server error methods should chect accepts and content type headers before parsing. Timur often does not display an error because json.parse fails on a non Json error, see #173.

Also please don't merge unreviewed PRs into other branches, it is difficult to undo if the PR is rejected.