Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get all extra metadata information #3900

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ShiromMakkad
Copy link

@ShiromMakkad ShiromMakkad commented Nov 1, 2024

Add extras function inside ErrorMetadata to get all extra error metadata without knowing the key.

Motivation and Context

I'm using the ProvideErrorMetadata trait to get as much information generically from Smithy Rust errors. Using the extra field requires that I know the key inside the HashMap which I don't. Using the Display trait returns the code, message, and extras as unstructured text. I don't want the code or message there.

Description

I want to get the entire extras hashmap without using the display trait

Testing

Ran cargo test --manifest-path=aws/rust-runtime/Cargo.toml which had 76 tests pass but it failed to run the python dep. I also ran cargo clippy --manifest-path=aws/rust-runtime/Cargo.toml which passed.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Add `extras` function inside `ErrorMetadata` to get all extra error metadata without knowing the key.
@ShiromMakkad ShiromMakkad requested review from a team as code owners November 1, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant