navis-org / pymaid

Python library to interface with CATMAID servers. Fully interoperable with navis.
https://pymaid.readthedocs.io/en/latest/
GNU General Public License v3.0
24 stars 11 forks source link

New CATMAID error handling #193

Open clbarnes opened 5 years ago

clbarnes commented 5 years ago

As of https://github.com/catmaid/CATMAID/pull/1923 (not released at time of writing), the CATMAID server will return meaningful status codes on errors. The response content still contains the same JSON-serialised exception info, but the status code will no longer be 200. Generally, it will be 500, unless the server raised a ValueError (assumed to be the result of bad inputs, so it's 400), or the user had insufficient privileges (401).

This is a warning that you may need to update your fetch layer (although hopefully it's a welcome change!). Thanks @tomka for making the change.

Tracking issue here: https://github.com/catmaid/CATMAID/issues/1921

schlegelp commented 5 years ago

Thanks for the heads-up - a welcome change indeed! I'll make according changes to Pymaid.