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