Skip to content

fix(event_handler): Updating body to empty-json instead of empty-string#2255

Closed
tushar-sahay-np wants to merge 1 commit intoaws-powertools:developfrom
tushar-sahay-np:patch-1
Closed

fix(event_handler): Updating body to empty-json instead of empty-string#2255
tushar-sahay-np wants to merge 1 commit intoaws-powertools:developfrom
tushar-sahay-np:patch-1

Conversation

@tushar-sahay-np
Copy link

@tushar-sahay-np tushar-sahay-np commented May 12, 2023

Issue number: #2254

Summary

Changes

Updated response of body in case when the powertool router does not find any API's mapped to the request. The body is updated from empty-string "" to empty-json {}

User experience

Earlier, the API Gateway responded with 500 internal server error for a pre-flight CORS request. After the change, the API is succesfully called.

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.

Signed-off-by: tushar-sahay-np <112628929+tushar-sahay-np@users.noreply.github.com>
@tushar-sahay-np tushar-sahay-np requested a review from a team as a code owner May 12, 2023 21:36
@tushar-sahay-np tushar-sahay-np requested review from rubenfonseca and removed request for a team May 12, 2023 21:36
@boring-cyborg
Copy link

boring-cyborg bot commented May 12, 2023

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #python channel on our AWS Lambda Powertools Discord: Invite link

@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 12, 2023
@tushar-sahay-np
Copy link
Author

Fix for Issue : #2254

@tushar-sahay-np tushar-sahay-np changed the title Fix for https://github.com/awslabs/aws-lambda-powertools-python/issue… Fix(CORS_lambda_proxy_integration): Updating body to empty-json instead of empty-string in case when API mapping/method not found May 12, 2023
@tushar-sahay-np tushar-sahay-np changed the title Fix(CORS_lambda_proxy_integration): Updating body to empty-json instead of empty-string in case when API mapping/method not found Fix(CORS_lambda_proxy_integration): Updating body to empty-json instead of empty-string May 12, 2023
@leandrodamascena leandrodamascena changed the title Fix(CORS_lambda_proxy_integration): Updating body to empty-json instead of empty-string fix(event_handler): Updating body to empty-json instead of empty-string May 13, 2023
@github-actions github-actions bot added the bug Something isn't working label May 13, 2023
@leandrodamascena
Copy link
Contributor

I added a "do-not-merge" label because I couldn't reproduce the error.

#2254 (comment)

@leandrodamascena leandrodamascena removed the bug Something isn't working label May 14, 2023
@leandrodamascena leandrodamascena requested review from leandrodamascena and removed request for rubenfonseca June 1, 2023 10:29
@leandrodamascena leandrodamascena added the revisit-in-3-months Requires more customers feedback before making or revisiting a decision label Jun 28, 2023
@heitorlessa
Copy link
Contributor

Closing; we can re-open once the related issue can be reproduced.

@heitorlessa heitorlessa closed this Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge event_handlers revisit-in-3-months Requires more customers feedback before making or revisiting a decision size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants