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

@@ -48,8 +48,8 @@ RETURNS TABLE(id text, description text, name text, aggregate text, source text)
except BaseException as e:
import sys
quota_service.increment_failed_service_use()
logger.error('Error trying to OBS_Search', sys.exc_info())
raise e
logger.error('Error trying to OBS_Search', sys.exc_info(), data={"username": username, "orgname": orgname})
raise Exception('Error trying to OBS_Search')
finally:
quota_service.increment_total_service_use()
$$ LANGUAGE plpythonu;
@@ -103,8 +103,8 @@ RETURNS TABLE(boundary_id text, description text, time_span text, tablename text
except BaseException as e:
import sys
quota_service.increment_failed_service_use()
logger.error('Error trying to OBS_GetMeasureById', sys.exc_info())
raise e
logger.error('Error trying to OBS_GetMeasureById', sys.exc_info(), data={"username": username, "orgname": orgname})
raise Exception('Error trying to OBS_GetMeasureById')
finally:
quota_service.increment_total_service_use()
$$ LANGUAGE plpythonu;