Skip to content

fix(event_handler): make decoded_body field optional in ApiGateway resolver #3937

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

Merged
merged 2 commits into from
Mar 13, 2024
Merged

fix(event_handler): make decoded_body field optional in ApiGateway resolver #3937

merged 2 commits into from
Mar 13, 2024

Conversation

leandrodamascena
Copy link
Contributor

@leandrodamascena leandrodamascena commented Mar 12, 2024

Issue number: #3706

Summary

Changes

This pull request resolves an issue within the event handler, specifically on the ApiGateway resolver. The decoded_body field is now optional, ensuring compatibility with diverse payloads, including local tests. Given that the field body is already optional, this change ensures consistency by making decoded_body Optional as well.

User experience

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

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

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@leandrodamascena leandrodamascena requested a review from a team March 12, 2024 11:53
@boring-cyborg boring-cyborg bot added the tests label Mar 12, 2024
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 12, 2024
@leandrodamascena leandrodamascena linked an issue Mar 12, 2024 that may be closed by this pull request
2 tasks
@leandrodamascena leandrodamascena changed the title fix(event_handler) Making decoded_body field optional in ApiGateway resolver fix(event_handler): Making decoded_body field optional in ApiGateway resolver Mar 12, 2024
@leandrodamascena leandrodamascena changed the title fix(event_handler): Making decoded_body field optional in ApiGateway resolver fix(event_handler): make decoded_body field optional in ApiGateway resolver Mar 12, 2024
@github-actions github-actions bot added the bug Something isn't working label Mar 12, 2024
@rubenfonseca
Copy link
Contributor

Reviewing now

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 96.33%. Comparing base (e14e768) to head (c3daf71).
Report is 166 commits behind head on develop.

Files Patch % Lines
...lambda_powertools/utilities/data_classes/common.py 66.66% 1 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3937      +/-   ##
===========================================
- Coverage    96.38%   96.33%   -0.05%     
===========================================
  Files          214      215       +1     
  Lines        10030    10251     +221     
  Branches      1846     1913      +67     
===========================================
+ Hits          9667     9875     +208     
- Misses         259      269      +10     
- Partials       104      107       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leandrodamascena leandrodamascena merged commit 1b64234 into aws-powertools:develop Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: APIGatewayProxyEventV2.decoded_body should not cause KeyError
3 participants