in aws-rds-cfn-common/src/main/java/software/amazon/rds/common/error/PlainErrorRuleSet.java [18:34]
public ErrorStatus handle(final Exception exception) {
if (errorClassMap.containsKey(exception.getClass())) {
return errorClassMap.get(exception.getClass());
}
if (exception instanceof AwsServiceException) {
final AwsServiceException awsServiceException = (AwsServiceException) exception;
final AwsErrorDetails errorDetails = awsServiceException.awsErrorDetails();
if (errorDetails != null) {
final String errorStr = errorDetails.errorCode();
final ErrorCode errorCode = ErrorCode.fromString(errorStr);
if (errorCode != null && errorCodeMap.containsKey(errorCode)) {
return errorCodeMap.get(errorCode);
}
}
}
return new UnexpectedErrorStatus(exception);
}