It would be nice if a post request to any application is guaranteed to return JSON. It does not if you hand in an unknown parameter, due to the following code on clams.ClamsHTTPApi.
When self.annotate_param_caster.cast(request.args) is given an undefined parameter it throws an error and that error is wrapped in a large XML structure by Flask/Werkzeug. We should either not throw an error or catch that error like we do with exceptions raised by annotate method.
It would be nice if a post request to any application is guaranteed to return JSON. It does not if you hand in an unknown parameter, due to the following code on
clams.ClamsHTTPApi
.When
self.annotate_param_caster.cast(request.args)
is given an undefined parameter it throws an error and that error is wrapped in a large XML structure by Flask/Werkzeug. We should either not throw an error or catch that error like we do with exceptions raised by annotate method.