Class AwsErrors
java.lang.Object
codes.grow.packages.cloudwatchlogs.AwsErrors
Maps AWS SDK errors to the SPEC section 2.1 exception classes (API.md section 1.1): AWS error
code first, then the HTTP status, then network, timeout and cancellation shapes. Messages read
"<operation>: <reason>: <AwsCode> (HTTP <status>)"; AWS messages are never copied into
the message (they may echo log data) and the cause is redacted with the known secrets.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRedacted copy of an AWS SDK exception kept as the cause of a mapped exception: class name and AWS error code, the message with known secrets removed, and the original stack trace. -
Field Summary
FieldsModifier and TypeFieldDescriptionAWS error codes and the Grow code they map to. -
Method Summary
Modifier and TypeMethodDescriptionawsErrorCode(Throwable error) Returns the AWS error code of an SDK error (without anamespace#prefix), also when it is wrapped in aCompletionExceptionor carried as the cause of a mapped SDK exception.static CloudWatchLogsExceptionmap(String operation, Throwable error, Collection<String> knownSecrets) Maps any error of an AWS SDK call to aCloudWatchLogsException.
-
Field Details
-
AWS_ERROR_CODES
AWS error codes and the Grow code they map to.
-
-
Method Details
-
awsErrorCode
Returns the AWS error code of an SDK error (without anamespace#prefix), also when it is wrapped in aCompletionExceptionor carried as the cause of a mapped SDK exception.- Parameters:
error- any throwable- Returns:
- the code, or empty
-
map
public static CloudWatchLogsException map(String operation, Throwable error, Collection<String> knownSecrets) Maps any error of an AWS SDK call to aCloudWatchLogsException. An SDK exception is returned unchanged.- Parameters:
operation- operation name for the messageerror- the errorknownSecrets- values to redact from the cause- Returns:
- the mapped exception
-