/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Client; using namespace Aws::Utils; using namespace Aws::Route53RecoveryReadiness; namespace Aws { namespace Route53RecoveryReadiness { namespace Route53RecoveryReadinessErrorMapper { static const int CONFLICT_HASH = HashingUtils::HashString("ConflictException"); static const int INTERNAL_SERVER_HASH = HashingUtils::HashString("InternalServerException"); AWSError GetErrorForName(const char* errorName) { int hashCode = HashingUtils::HashString(errorName); if (hashCode == CONFLICT_HASH) { return AWSError(static_cast(Route53RecoveryReadinessErrors::CONFLICT), false); } else if (hashCode == INTERNAL_SERVER_HASH) { return AWSError(static_cast(Route53RecoveryReadinessErrors::INTERNAL_SERVER), false); } return AWSError(CoreErrors::UNKNOWN, false); } } // namespace Route53RecoveryReadinessErrorMapper } // namespace Route53RecoveryReadiness } // namespace Aws