-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
178 lines (153 loc) · 7.54 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudcontrolapi
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeAlreadyExistsException for service response error code
// "AlreadyExistsException".
//
// The resource with the name requested already exists.
ErrCodeAlreadyExistsException = "AlreadyExistsException"
// ErrCodeClientTokenConflictException for service response error code
// "ClientTokenConflictException".
//
// The specified client token has already been used in another resource request.
//
// It's best practice for client tokens to be unique for each resource operation
// request. However, client token expire after 36 hours.
ErrCodeClientTokenConflictException = "ClientTokenConflictException"
// ErrCodeConcurrentModificationException for service response error code
// "ConcurrentModificationException".
//
// The resource is currently being modified by another operation.
ErrCodeConcurrentModificationException = "ConcurrentModificationException"
// ErrCodeConcurrentOperationException for service response error code
// "ConcurrentOperationException".
//
// Another resource operation is currently being performed on this resource.
ErrCodeConcurrentOperationException = "ConcurrentOperationException"
// ErrCodeGeneralServiceException for service response error code
// "GeneralServiceException".
//
// The resource handler has returned that the downstream service generated an
// error that doesn't map to any other handler error code.
ErrCodeGeneralServiceException = "GeneralServiceException"
// ErrCodeHandlerFailureException for service response error code
// "HandlerFailureException".
//
// The resource handler has failed without a returning a more specific error
// code. This can include timeouts.
ErrCodeHandlerFailureException = "HandlerFailureException"
// ErrCodeHandlerInternalFailureException for service response error code
// "HandlerInternalFailureException".
//
// The resource handler has returned that an unexpected error occurred within
// the resource handler.
ErrCodeHandlerInternalFailureException = "HandlerInternalFailureException"
// ErrCodeInvalidCredentialsException for service response error code
// "InvalidCredentialsException".
//
// The resource handler has returned that the credentials provided by the user
// are invalid.
ErrCodeInvalidCredentialsException = "InvalidCredentialsException"
// ErrCodeInvalidRequestException for service response error code
// "InvalidRequestException".
//
// The resource handler has returned that invalid input from the user has generated
// a generic exception.
ErrCodeInvalidRequestException = "InvalidRequestException"
// ErrCodeNetworkFailureException for service response error code
// "NetworkFailureException".
//
// The resource handler has returned that the request couldn't be completed
// due to networking issues, such as a failure to receive a response from the
// server.
ErrCodeNetworkFailureException = "NetworkFailureException"
// ErrCodeNotStabilizedException for service response error code
// "NotStabilizedException".
//
// The resource handler has returned that the downstream resource failed to
// complete all of its ready-state checks.
ErrCodeNotStabilizedException = "NotStabilizedException"
// ErrCodeNotUpdatableException for service response error code
// "NotUpdatableException".
//
// One or more properties included in this resource operation are defined as
// create-only, and therefore can't be updated.
ErrCodeNotUpdatableException = "NotUpdatableException"
// ErrCodePrivateTypeException for service response error code
// "PrivateTypeException".
//
// Cloud Control API hasn't received a valid response from the resource handler,
// due to a configuration error. This includes issues such as the resource handler
// returning an invalid response, or timing out.
ErrCodePrivateTypeException = "PrivateTypeException"
// ErrCodeRequestTokenNotFoundException for service response error code
// "RequestTokenNotFoundException".
//
// A resource operation with the specified request token can't be found.
ErrCodeRequestTokenNotFoundException = "RequestTokenNotFoundException"
// ErrCodeResourceConflictException for service response error code
// "ResourceConflictException".
//
// The resource is temporarily unavailable to be acted upon. For example, if
// the resource is currently undergoing an operation and can't be acted upon
// until that operation is finished.
ErrCodeResourceConflictException = "ResourceConflictException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// A resource with the specified identifier can't be found.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeServiceInternalErrorException for service response error code
// "ServiceInternalErrorException".
//
// The resource handler has returned that the downstream service returned an
// internal error, typically with a 5XX HTTP status code.
ErrCodeServiceInternalErrorException = "ServiceInternalErrorException"
// ErrCodeServiceLimitExceededException for service response error code
// "ServiceLimitExceededException".
//
// The resource handler has returned that a non-transient resource limit was
// reached on the service side.
ErrCodeServiceLimitExceededException = "ServiceLimitExceededException"
// ErrCodeThrottlingException for service response error code
// "ThrottlingException".
//
// The request was denied due to request throttling.
ErrCodeThrottlingException = "ThrottlingException"
// ErrCodeTypeNotFoundException for service response error code
// "TypeNotFoundException".
//
// The specified extension doesn't exist in the CloudFormation registry.
ErrCodeTypeNotFoundException = "TypeNotFoundException"
// ErrCodeUnsupportedActionException for service response error code
// "UnsupportedActionException".
//
// The specified resource doesn't support this resource operation.
ErrCodeUnsupportedActionException = "UnsupportedActionException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"AlreadyExistsException": newErrorAlreadyExistsException,
"ClientTokenConflictException": newErrorClientTokenConflictException,
"ConcurrentModificationException": newErrorConcurrentModificationException,
"ConcurrentOperationException": newErrorConcurrentOperationException,
"GeneralServiceException": newErrorGeneralServiceException,
"HandlerFailureException": newErrorHandlerFailureException,
"HandlerInternalFailureException": newErrorHandlerInternalFailureException,
"InvalidCredentialsException": newErrorInvalidCredentialsException,
"InvalidRequestException": newErrorInvalidRequestException,
"NetworkFailureException": newErrorNetworkFailureException,
"NotStabilizedException": newErrorNotStabilizedException,
"NotUpdatableException": newErrorNotUpdatableException,
"PrivateTypeException": newErrorPrivateTypeException,
"RequestTokenNotFoundException": newErrorRequestTokenNotFoundException,
"ResourceConflictException": newErrorResourceConflictException,
"ResourceNotFoundException": newErrorResourceNotFoundException,
"ServiceInternalErrorException": newErrorServiceInternalErrorException,
"ServiceLimitExceededException": newErrorServiceLimitExceededException,
"ThrottlingException": newErrorThrottlingException,
"TypeNotFoundException": newErrorTypeNotFoundException,
"UnsupportedActionException": newErrorUnsupportedActionException,
}