MCPcopy Create free account
hub / github.com/ExtendDB/extenddb / err_code

Function err_code

tests/rust/src/helpers.rs:21–26  ·  view source on GitHub ↗

Extract the DynamoDB error code from an `SdkError`. Uses `ProvideErrorMetadata::code()` to get the error code string (e.g., "ResourceNotFoundException", "ConditionalCheckFailedException"). Returns `None` for non-service errors (dispatch failures, timeouts, etc.).

(err: &aws_smithy_runtime_api::client::result::SdkError<E, R>)

Source from the content-addressed store, hash-verified

19/// (e.g., "ResourceNotFoundException", "ConditionalCheckFailedException").
20/// Returns `None` for non-service errors (dispatch failures, timeouts, etc.).
21pub fn err_code<E, R>(err: &aws_smithy_runtime_api::client::result::SdkError<E, R>) -> Option<&str>
22where
23 E: ProvideErrorMetadata,
24{
25 ProvideErrorMetadata::code(err)
26}
27
28// ========== AttributeValue constructors ==========
29

Calls

no outgoing calls

Tested by 2

create_table_rawFunction · 0.68
wait_for_deletedFunction · 0.68