Skip to content

Rust ergonomics for error handling #23

Closed
@arienmalec

Description

@arienmalec

The examples for using the Rust Lambda runtime require additional calls around error handling that require access to the Context object.

Unfortunately, that breaks Rust ergonomics for error handing, that ordinarily would use ? and map custom errors to HandlerError through an impl From (which doesn't have a reference to the Context struct.

Ideally, I could return my own error types, and either have the runtime take care of supplying context, with perhaps some place to inject logging, etc. into the error handing flow.

In practice, in the short term, I'm breaking out all actions that can return a Result into a separate module, because even trivial activities get complicated quickly if you want to inject error handing with access to Context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions