adsabs / adsws

ADS web services
Other
2 stars 15 forks source link

JSON everything, including errors! #17

Closed vsudilov closed 9 years ago

vsudilov commented 9 years ago

In the case of oauth2 401 responses, this will require overwriting/patching the abort() method in flask, I'm afraid.

http://flask.pocoo.org/snippets/97/ does exactly this, but optionally returns the html formatted error based on the http accept header.

vsudilov commented 9 years ago

Not based on content negotiation, but implemented 401,404,429,and 405 handlers that return JSON in factory.py. Closing until we actually need content-negotiation or something more exhaustive.

closed in c66fe3800c309