awslabs / aws-lambda-rust-runtime

A Rust runtime for AWS Lambda
Apache License 2.0
3.29k stars 335 forks source link

doc: Add an example for using the anyhow crate #904

Closed taiki45 closed 1 month ago

taiki45 commented 1 month ago

📬 Issue #, if available:

Not resolve but related with https://github.com/awslabs/aws-lambda-rust-runtime/issues/901

✍️ Description of changes:

v0.12.0 has breaking changes for users who use external error types like anyhow::Error. This PR brings documentation that makes it easier for both existing and new users to write lambda functions with crates like anyhow.

While I believe a fundamental solution to eliminate the need for conversion from external error types to common types should be addressed in #901, this PR aims to provide documentation support for existing users encountering changes in v0.12.0 and for new users of the library who might struggle with simply using anyhow::Result. I think it's important to follow up with documentation to assist these users.

🔏 By submitting this pull request Both in the root and the example root: