Skip to content

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

Open
ryota765 wants to merge 1 commit intorubyonjets:masterfrom
ryota765:feature/patch-handle-lambda-response
Open

Handle nil response from Lambda when invocation_type = "Event"#732
ryota765 wants to merge 1 commit intorubyonjets:masterfrom
ryota765:feature/patch-handle-lambda-response

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