Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(idempotency): Correctly handle save_inprogress errors #313

Merged
merged 2 commits into from
Mar 6, 2021

Conversation

michaelbrewer
Copy link
Contributor

@michaelbrewer michaelbrewer commented Mar 6, 2021

Description of changes:

GIVEN a miss configured persistence layer
like no table was created for the idempotency persistence layer
WHEN handling the idempotent call
AND save_inprogress raises a ClientError
THEN idempotent should raise an IdempotencyPersistenceLayerError

Checklist

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-io
Copy link

codecov-io commented Mar 6, 2021

Codecov Report

Merging #313 (b98b5ec) into develop (8b6a68b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #313   +/-   ##
========================================
  Coverage    99.88%   99.88%           
========================================
  Files           91       91           
  Lines         3338     3340    +2     
  Branches       161      162    +1     
========================================
+ Hits          3334     3336    +2     
  Misses           2        2           
  Partials         2        2           
Impacted Files Coverage Δ
...da_powertools/utilities/idempotency/idempotency.py 98.52% <100.00%> (+0.04%) ⬆️

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 8b6a68b...b98b5ec. Read the comment docs.

Copy link
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Michael for catching that! I'll wait until mid next week in case we catch some more before releasing a patch version

@heitorlessa heitorlessa added area/utilities bug Something isn't working labels Mar 6, 2021
@heitorlessa heitorlessa merged commit b6e61e2 into aws-powertools:develop Mar 6, 2021
@michaelbrewer michaelbrewer deleted the raise-persist-layer-error branch March 7, 2021 07:33
heitorlessa added a commit that referenced this pull request Mar 9, 2021
…tools-python into develop

* 'develop' of https://github.com/awslabs/aws-lambda-powertools-python:
  feat(logging): Include exception_name (#320)
  chore: remove gatsby mention as migrated completed
  refactor(parameters): Consistently reference env (#319)
  docs(metrics): remove minimum dimensions
  docs: Correct code examples (#317)
  docs(metrics): Correct code examples in markdown (#316)
  fix(idempotency): TypeError when calling is_missing_idempotency_key with an int (#315)
  docs(metrics): Corrections to the code examples (#314)
  fix(idempotency): Correctly handle save_inprogress errors (#313)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants