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()
def _render_error(self, error, request): ''' Callback when the DNS lookup fails. ''' error.printTraceback() result = response.error_tb(error) response.send_json(request, result)
def close_failed(error, request): "Close errback" print("Close curcuit failed: ", error) response.send_json(request, response.error_tb(error))