Beispiel #1
0
 def on_error(error):
     """
     called on save error.
     """
     self.object.config.config[self.object.name] = original_value
     request.write(json.dumps(response.error_tb(error)).encode("utf-8"))
     request.finish()
Beispiel #2
0
 def _render_error(self, error, request):
     '''
     Callback when the DNS lookup fails.
     '''
     error.printTraceback()
     result = response.error_tb(error)
     response.send_json(request, result)
Beispiel #3
0
 def close_failed(error, request):
     "Close errback"
     print("Close curcuit failed: ", error)
     response.send_json(request, response.error_tb(error))