Dont re-raise the exception to avoid leak sensitive information

This commit is contained in:
Mario de Frutos
2016-08-02 18:59:13 +02:00
parent 9186eb5d5b
commit a33999ed04
14 changed files with 82 additions and 78 deletions

View File

@@ -26,8 +26,8 @@ RETURNS Geometry AS $$
except BaseException as e:
import sys
quota_service.increment_failed_service_use()
logger.error('Error trying to geocode admin1 polygon', sys.exc_info())
raise e
logger.error('Error trying to geocode admin1 polygon', sys.exc_info(), data={"username": username, "orgname": orgname})
raise Exception('Error trying to geocode admin1 polygon')
finally:
quota_service.increment_total_service_use()
$$ LANGUAGE plpythonu;
@@ -60,8 +60,8 @@ RETURNS Geometry AS $$
except BaseException as e:
import sys
quota_service.increment_failed_service_use()
logger.error('Error trying to geocode admin1 polygon', sys.exc_info())
raise e
logger.error('Error trying to geocode admin1 polygon', sys.exc_info(), data={"username": username, "orgname": orgname})
raise Exception('Error trying to geocode admin1 polygon')
finally:
quota_service.increment_total_service_use()
$$ LANGUAGE plpythonu;