"""Error handler functions for specific types of failures.""" import sentry_sdk from flask import g def log_db_exception(exception): """Log a DB exception to Sentry and Loggly.""" sentry_sdk.capture_exception(exception) g.ows.log.error('DB error: {}'.format(exception))