MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / sdk_error_code

Function sdk_error_code

crates/chat-cli/src/api_client/error.rs:215–219  ·  view source on GitHub ↗
(e: &SdkError<T, R>)

Source from the content-addressed store, hash-verified

213}
214
215pub fn sdk_error_code<T: ProvideErrorMetadata, R>(e: &SdkError<T, R>) -> String {
216 e.as_service_error()
217 .and_then(|se| se.meta().code().map(str::to_string))
218 .unwrap_or_else(|| e.to_string())
219}
220
221fn sdk_status_code<E>(e: &SdkError<E, Response>) -> Option<u16> {
222 e.raw_response().map(|res| res.status().as_u16())

Callers 2

classify_error_kindFunction · 0.85
reason_codeMethod · 0.85

Calls 4

mapMethod · 0.80
to_stringMethod · 0.80
codeMethod · 0.45
metaMethod · 0.45

Tested by

no test coverage detected