-
Notifications
You must be signed in to change notification settings - Fork 246
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
impl ProvideErrorMetadata for [service]::Error #780
Comments
Hey @imp, thanks for submitting this issue. This would increase crate file sizes but it seems worth it. We'll add it to our backlog. |
Perhaps fix for this could be implemented together with #784 (which was recently addressed by smithy-rs#2564). |
Hello, is there anything that could be done to help progress with this issue? (Short of submitting actual PR - I am not familiar with Kotlin). |
Sorry for the delay on this. I've implemented the functionality in smithy-lang/smithy-rs#3189 |
This PR implements the `ProvideErrorMetadata` trait for service errors as a prerequisite for implementing [RFC-39](https://github.com/awslabs/smithy-rs/blob/main/design/src/rfcs/rfc0039_forward_compatible_errors.md). Related SDK issue: awslabs/aws-sdk-rust#780 ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
This will go out in the next release. |
This went out with the November 16th release. |
|
Describe the feature
For each
service
(such asdynamodb
,ec2
,iam
, etc) there istrait service::error::ProvideErrorMetadata
which is implemented for all the variants of theservice::Error
. However theservice::Error
itself does not implement this trait. It may be useful to provide this out of the box. Automatically generating this impl block should not be a problem as is it should just call a respective.meta()
method on the inner error variant.Use Case
I am writing some error handling code and using
service::Error
is very convenient. Alas, after converting to this type I am loosing access to error details, and this makes general purpose diagnostic very hard.Proposed Solution
Here is example implementation for
aws_sdk_iam::Error
(very similar to howRequestId
is implemented):Other Information
No response
Acknowledgements
A note for the community
Community Note
The text was updated successfully, but these errors were encountered: