If this returns a response from ``app_error()`` it will be in HTML. We could alter [custom_error()](https://github.com/mozilla/webpay/blob/master/webpay/base/utils.py#L53) to check the accept header from the request object to make it JSON. Could also file another bug and add a todo for that.