AWS SDK for C++  0.14.3
AWS SDK for C++
CoreErrors.h
Go to the documentation of this file.
1 /*
2  * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 #pragma once
16 
17 #include "aws/core/Core_EXPORTS.h"
18 
19 namespace Aws
20 {
21  namespace Client
22  {
23  template<typename ERROR_TYPE>
24  class AWSError;
25 
26  enum class CoreErrors
27  {
29  INTERNAL_FAILURE = 1,
30  INVALID_ACTION = 2,
35  MISSING_ACTION = 7, // SDK should never allow
36  MISSING_AUTHENTICATION_TOKEN = 8, // SDK should never allow
37  MISSING_PARAMETER = 9, // SDK should never allow
38  OPT_IN_REQUIRED = 10,
39  REQUEST_EXPIRED = 11,
41  THROTTLING = 13,
42  VALIDATION = 14,
43  ACCESS_DENIED = 15,
44  RESOURCE_NOT_FOUND = 16, // Shared with multiple services
45  UNRECOGNIZED_CLIENT = 17, // Most likely caused by an invalid access key or secret key
46  MALFORMED_QUERY_STRING = 18, // Where does this come from? (cognito identity uses it)
47 
48  NETWORK_CONNECTION = 99, // General failure to send message to service
49 
50  // These are needed for logical reasons
51  UNKNOWN = 100, // Unknown to the SDK
53  };
54 
55  namespace CoreErrorsMapper
56  {
60  AWS_CORE_API AWSError<CoreErrors> GetErrorForName(const char* errorName);
61  } // namespace CoreErrorsMapper
62  } // namespace Client
63 } // namespace Aws
64 
65 
AWS_CORE_API AWSError< CoreErrors > GetErrorForName(const char *errorName)
#define AWS_CORE_API
Definition: Core_EXPORTS.h:35
JSON (JavaScript Object Notation).