Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

fix: have webpush router handle ClientErrors #1141

Merged
merged 1 commit into from
Mar 2, 2018
Merged

fix: have webpush router handle ClientErrors #1141

merged 1 commit into from
Mar 2, 2018

Conversation

pjenvey
Copy link
Member

@pjenvey pjenvey commented Mar 2, 2018

it was previously handling only the old boto2 JSONResponseError in
those spots

also kill the remaining boto2 bits

Closes #1138

it was previously handling only the old boto2 JSONResponseError in
those spots

also kill the remaining boto2 bits

Closes #1138
@codecov-io
Copy link

codecov-io commented Mar 2, 2018

Codecov Report

Merging #1141 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
autopush/web/webpush.py 100% <ø> (ø) ⬆️
autopush/utils.py 100% <ø> (ø) ⬆️
autopush/types.py 100% <100%> (ø) ⬆️
autopush/web/health.py 100% <100%> (ø) ⬆️
autopush/tests/__init__.py 100% <100%> (ø) ⬆️
autopush/tests/test_router.py 100% <100%> (ø) ⬆️
autopush/web/registration.py 100% <100%> (ø) ⬆️
autopush/tests/test_db.py 99.74% <100%> (-0.01%) ⬇️
autopush/exceptions.py 100% <100%> (ø) ⬆️
autopush/tests/test_web_validation.py 100% <100%> (ø) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd2af26...36ad90f. Read the comment docs.

elif failure.check(InternalServerError): # pragma nocover
elif (failure.check(ClientError) and
failure.value.response["Error"]["Code"] ==
"InternalServerError"): # pragma nocover
Copy link
Member

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?

Copy link
Member Author

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):
Copy link
Member

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....

@bbangert bbangert merged commit 9ca2d2b into master Mar 2, 2018
@bbangert bbangert deleted the fix/1138b branch March 2, 2018 23:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants