Skip to content

Thread panic errors when using sam local #604

@btyrrell-mn

Description

@btyrrell-mn

I'm using Python/FastAPI with the LWA and I'm doing some testing with sam local start-api.

I am randomly seeing this error from the LWA when invoking my endpoint:

thread 'main' panicked at src/main.rs:25:25:
lambda runtime failed: hyper_util::client::legacy::Error(SendRequest, hyper::Error(IncompleteMessage))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

If I set RUST_BACKTRACE=1 there's no traceback.

thread 'main' panicked at src/main.rs:25:25:
lambda runtime failed: hyper_util::client::legacy::Error(SendRequest, hyper::Error(IncompleteMessage))
stack backtrace:

or

thread 'main' panicked at src/main.rs:25:25:
lambda runtime failed: hyper_util::client::legacy::Error(SendRequest, hyper::Error(IncompleteMessage))
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

If I set RUST_BACKTRACE=full it's the same output. Again, seems random and not on every invoke.

EDIT: The function returns and I receive the HTTP response on test invokes even when this error occurs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions