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

Handle nil response from Lambda when invocation_type = "Event" #732

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ryota765
Copy link

@ryota765 ryota765 commented Aug 5, 2024

This is a 🐞 bug fix.

  • I've added tests (if it's a bug, feature or enhancement)
  • I've adjusted the documentation (if it's a feature or enhancement)
  • The test suite passes (run bundle exec rspec to verify this)

Summary

In v5.0.X, when Lambda function is invoked with invocation_type = "Event", the response from Lambda will only include status code and the payload becomes null.
This will cause NoMethodError (undefined method read for nil:NilClass).
Therefore, I added handling for nil value.

Context

No specific context.

How to Test

Call Lambda functions with invocation_type = "Event" option in v5.0.X

Version Changes

v5.0.15 (Please merge to v5 branch, instead of latest master branch 🙏 )

@ryota765 ryota765 closed this Aug 5, 2024
@ryota765 ryota765 reopened this Aug 5, 2024
@ryota765 ryota765 marked this pull request as ready for review August 5, 2024 10:15
@ryota765 ryota765 changed the title handle nil payload Handle nil response from Lambda when invocation_type = "Event" Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant