-
Hi, I have an error mocking in v1 like this:
How can I convert it to v2? Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
RanVaknin
Jul 19, 2023
Replies: 2 comments 3 replies
-
Hi @yongzhang , For Service errors, the v2 SDK uses the smithy-go package mockErr := &smithy.GenericAPIError{
Code: "500",
Message: "Internal Error",
Fault: 0,
} Or you can provide your own implementation that satisfies the APIError interface. Thanks, |
Beta Was this translation helpful? Give feedback.
3 replies
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @yongzhang,
As far as I can tell there is no provided implementation that has the requestId provided the same way.
You can write your own implementation around APIError to include requestId pretty easily though:
Thanks,
Ran~