/** * 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::ConnectContactLens; namespace Aws { namespace ConnectContactLens { namespace ConnectContactLensErrorMapper { static const int INTERNAL_SERVICE_HASH = HashingUtils::HashString("InternalServiceException"); static const int INVALID_REQUEST_HASH = HashingUtils::HashString("InvalidRequestException"); AWSError GetErrorForName(const char* errorName) { int hashCode = HashingUtils::HashString(errorName); if (hashCode == INTERNAL_SERVICE_HASH) { return AWSError(static_cast(ConnectContactLensErrors::INTERNAL_SERVICE), false); } else if (hashCode == INVALID_REQUEST_HASH) { return AWSError(static_cast(ConnectContactLensErrors::INVALID_REQUEST), false); } return AWSError(CoreErrors::UNKNOWN, false); } } // namespace ConnectContactLensErrorMapper } // namespace ConnectContactLens } // namespace Aws