Queens-Hacks / qcumber-api

transforms qcumber data repo into something blah
1 stars 3 forks source link

DataTransformer middleware should transform werkzeug http exceptions #15

Closed uniphil closed 10 years ago

uniphil commented 10 years ago

getting an html error body through a json api sucks...

Graham42 commented 10 years ago

I didn't exactly do this with the DataTransformer, thoughts?

uniphil commented 10 years ago

Good call leaving it out of the transformer. It would be out of scope. It should probably come before the transformer though.

Graham42 commented 10 years ago

makes sense, then the DataTransformer can change the type to whatever the request was

Edit: something to think about though, in this order, if NotAcceptable is thrown in the before method of DataTransformer on line 70, it won't return a nice jsonified error