Completed
Push — master ( 4a8e06...f3ba25 )
by George
01:56
created

sentry_handler()   A

Complexity

Conditions 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285

1 Method

Rating   Name   Duplication   Size   Complexity  
A send_to_sentry() 0 6 1
1
# TODO: it should be async
2
# https://github.com/getsentry/raven-aiohttp
3
4
5
def sentry_handler(client):
6
7
    def send_to_sentry(exc_type, exc, message):
0 ignored issues
show
Unused Code introduced by
The argument exc_type seems to be unused.
Loading history...
Unused Code introduced by
The argument exc seems to be unused.
Loading history...
8
        client.captureException(
9
            extra={'message': message},
10
        )
11
        # The message that originated the error will be acknowledged
12
        return True
13
14
    return send_to_sentry
15