-
Notifications
You must be signed in to change notification settings - Fork 190
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
Add RFC for improving client error ergonomics #2075
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
Err(err) => match err.into_service_error() { | ||
GetObjectError::InvalidObjectState(value) => { | ||
println!("invalid object state: {:?}", value); | ||
} | ||
err if err.is_no_such_key() => { | ||
println!("object didn't exist"); | ||
} | ||
err if err.code() == Some("SomeUnmodeledError") => {} | ||
err @ _ => return Err(err.into()), | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a great UX! I'd enjoy interacting with this.
Co-authored-by: Zelda Hessler <[email protected]>
Co-authored-by: Zelda Hessler <[email protected]>
Co-authored-by: Zelda Hessler <[email protected]>
A new generated diff is ready to view.
A new doc preview is ready to view. |
Need to incorporate feedback from awslabs/aws-sdk-rust#693 |
Any updates on this? Making your errors compatible with Tauri (making them serializable) has been an absolute nightmare given the multiple conversion steps I need to run... |
This RFC was implemented a long time ago, but I never got around to incorporating the feedback from awslabs/aws-sdk-rust#693. At this point, I want to get this merged just so that it's in the designs folder rather than in an ancient unmerged PR.
Sorry I didn't see this sooner. I need to understand your use-case better. Feel free to file an issue. My gut feel though is that you shouldn't need to serialize these errors for the UI, besides maybe converting them into a user-friendly error message. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
Motivation and Context
This RFC proposes merging
Error
/ErrorKind
on code generated client errors to simplify error handling.Rendered
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.