Skip to content

How best to test errors #748

Answered by jdisanti
sazzer asked this question in Q&A
Mar 1, 2023 · 2 comments · 6 replies
Discussion options

You must be logged in to vote

Right now, there isn't a way construct most of the errors the SDK returns. I think we should make it possible to construct the error types for better testing, and this has been requested in smithy-lang/smithy-rs#2208

Like you said, you can have your wrapper return your own error types, but that won't enable you to test the wrapper's error matching logic.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@rcoh
Comment options

@sazzer
Comment options

@jdisanti
Comment options

@sazzer
Comment options

@ivan-kiselev
Comment options

Answer selected by sazzer
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants