lambda-debugger-runtime-emulator icon indicating copy to clipboard operation
lambda-debugger-runtime-emulator copied to clipboard

Support empty (`serde_json::to_value(())`) responses

Open indiv0 opened this issue 3 years ago • 0 comments

Hi! This is an awesome project.

I just got it going with some Lambdas I'm working on, and it's working perfectly. I ran into two small issues while getting it going:

  • If my project and and the debug proxy are building against two separate versions of lambda_runtime, it fails because it can't determine which crate to use types from
  • Sending responses from Lambdas that use Ok(()) to denote success fails because it thinks that JSON null is base58-encoded
    • Lambdas that return Ok(()) include ones that handle batches of events (like a DynamoDB streams processing Lambda)

To fix this, I:

  • pinned the lambda_runtime version to "0.5.1" (latest release)
  • modified the base58 check to check for null bodies

indiv0 avatar May 28 '22 22:05 indiv0