Fixes the following issues I encountered while trying to run an extension built with the lambda-extension crate in AWS Lambda RIE:
AWS Lambda RIE returns status code 202 Accepted instead of 200 when emulating the Telemetry API (see the response codes on this page), which led to the error: unable to initialize the telemetry api: 202 Accepted. This patch accepts all status codes in the 200-299 range instead. I also changed similar occurrences for consistency.
Fixes the following issues I encountered while trying to run an extension built with the
lambda-extension
crate in AWS Lambda RIE:202 Accepted
instead of 200 when emulating the Telemetry API (see the response codes on this page), which led to the error:unable to initialize the telemetry api: 202 Accepted
. This patch accepts all status codes in the 200-299 range instead. I also changed similar occurrences for consistency.tracing
field onInvokeEvent
is not set, so I made it optional. Please let me know if this change is too intrusive (maybe#[serde(default)]
would be a better fit here?). Also see https://github.com/aws/aws-lambda-runtime-interface-emulator/issues/109By submitting this pull request