Skip to content

Commit 27cce3b

Browse files
devdupontrokob
authored andcommitted
Add quart to contrib (#300)
1 parent 0af4869 commit 27cce3b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

rollbar/contrib/quart/__init__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""
2+
Integration with Quart
3+
"""
4+
5+
from quart import request
6+
import rollbar
7+
8+
9+
def report_exception(app, exception):
10+
rollbar.report_exc_info(request=request)
11+
12+
13+
def _hook(request, data):
14+
data['framework'] = 'quart'
15+
16+
if request:
17+
data['context'] = str(request.url_rule)
18+
19+
rollbar.BASE_DATA_HOOK = _hook

0 commit comments

Comments
 (0)