-
Notifications
You must be signed in to change notification settings - Fork 30
fix: have webpush router handle ClientErrors #1141
Conversation
it was previously handling only the old boto2 JSONResponseError in those spots also kill the remaining boto2 bits Closes #1138
Codecov Report
@@ Coverage Diff @@
## master #1141 +/- ##
==========================================
- Coverage 99.76% 99.76% -0.01%
==========================================
Files 60 60
Lines 9966 9951 -15
==========================================
- Hits 9943 9928 -15
Misses 23 23
Continue to review full report at Codecov.
|
elif failure.check(InternalServerError): # pragma nocover | ||
elif (failure.check(ClientError) and | ||
failure.value.response["Error"]["Code"] == | ||
"InternalServerError"): # pragma nocover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is becoming a reoccurring pattern. I wonder if we should create a function that just does this combined check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally, I almost created one in this diff but figured I'd keep these short/readable. Logged #1142
@@ -64,3 +64,7 @@ class LogCheckError(Exception): | |||
|
|||
class InvalidConfig(Exception): | |||
"""Error in initialization of AutopushConfig""" | |||
|
|||
|
|||
class ItemNotFound(Exception): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😞 cause boto3 no longer provides such a useful thing....
it was previously handling only the old boto2 JSONResponseError in
those spots
also kill the remaining boto2 bits
Closes #1138