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

Client doesn't pass back HTTP response status codes with errors #25

Closed
eatyourgreens opened this issue Feb 18, 2016 · 1 comment
Closed
Labels

Comments

@eatyourgreens
Copy link
Contributor

This piece of code triggers a 422: unprocessable entity from Panoptes by posting a malformed classification.

classification.metadata = {}
classification.save().catch( function(e){ console.log(e); } );

e comes back as Error: {"metadata"=>"did not contain a required property of 'workflow_version'"} so it's impossible to tell this failed with a 422. Consequently, it's not possible to write client code that decides on an error handling strategy based on the HTTP response eg. queue failed classifications in case of a 500 or 503, but not in case of a 404 or 422.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant