def _handle_500(request, response, exception):
    logging.exception(exception)
    http_util.write(
        response,
        text=json.dumps({
            'errors': [exception.message if exception else "An error occured"]
        }),
        content_type="application/json",
        status=500)
Beispiel #2
0
def _handle_500(request,  response,  exception):
    logging.exception(exception)
    http_util.write(response,
                    text = json.dumps({'errors' : [
                        exception.message
                        if exception
                        else "An error occured"
                    ]}),
                    content_type = "application/json",
                    status = 500)
Beispiel #3
0
 def write(self,text=None, status=None, content_type = None):
     http_util.write(self.response, text, status, content_type)
Beispiel #4
0
 def write(self, text=None, status=None, content_type=None):
     http_util.write(self.response, text, status, content_type)