Ejemplo n.º 1
0
def exec_request(http_call):
	try:
		return http_call()
	except (RequestFailed, RequestError) as inst:
		# We need to know url for debug info, but the system has broken, so raise it to the higher level
		if getattr(inst, 'response', False):
			app_logger.error(inst.response.final_url, exc_info=True)
		raise 
Ejemplo n.º 2
0
def log_exception(inst):
    app_logger.error(inst)
    app_logger.error(sys.exc_info())