How to extract StatusCode from error, e.g. bedrockruntime.Converse? #2763
Unanswered
laszukdawid
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is definitely silly question but I find the whole SDK and "documentation" very difficult to read.
Basically, here's a snippet from my public code
I'd like to provide more feedback to users on what the error is and what they could do to mitigate it. For example, if there's 403 then that means checking credentials or permissions. But, I don't understand how to extract that information from the
err
? Printing out, it looks likeaws/transport/http.ErrorResponse
but do I need to cast / marshal it into it?My understanding of the sdk is very limited as... I just can't read/understand it. Seems that there's something called "smithy" that is expected to parse some things. Is this one of those things to parse? In addition to concrete answer on the StatusCode, I'd appreciate any guides on how to read the "documentation" / sdk.
Beta Was this translation helpful? Give feedback.
All reactions