Adding additional failure conditions to sentry tracking. (#853)

* Adding additional failure conditions to sentry tracking.

* Removing sentry extension as a circular import.
This commit is contained in:
kevgliss
2017-07-13 14:49:04 -07:00
committed by GitHub
parent 6779e19ac9
commit 61c493fc91
6 changed files with 54 additions and 34 deletions

View File

@ -15,6 +15,8 @@ from sqlalchemy.orm.collections import InstrumentedList
from inflection import camelize, underscore
from marshmallow import Schema, post_dump, pre_load
from lemur.extensions import sentry
class LemurSchema(Schema):
"""
@ -157,6 +159,7 @@ def validate_schema(input_schema, output_schema):
try:
resp = f(*args, **kwargs)
except Exception as e:
sentry.captureException()
current_app.logger.exception(e)
return dict(message=str(e)), 500