-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
196 lines (167 loc) · 8.47 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package workdocs
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeConcurrentModificationException for service response error code
// "ConcurrentModificationException".
//
// The resource hierarchy is changing.
ErrCodeConcurrentModificationException = "ConcurrentModificationException"
// ErrCodeConflictingOperationException for service response error code
// "ConflictingOperationException".
//
// Another operation is in progress on the resource that conflicts with the
// current operation.
ErrCodeConflictingOperationException = "ConflictingOperationException"
// ErrCodeCustomMetadataLimitExceededException for service response error code
// "CustomMetadataLimitExceededException".
//
// The limit has been reached on the number of custom properties for the specified
// resource.
ErrCodeCustomMetadataLimitExceededException = "CustomMetadataLimitExceededException"
// ErrCodeDeactivatingLastSystemUserException for service response error code
// "DeactivatingLastSystemUserException".
//
// The last user in the organization is being deactivated.
ErrCodeDeactivatingLastSystemUserException = "DeactivatingLastSystemUserException"
// ErrCodeDocumentLockedForCommentsException for service response error code
// "DocumentLockedForCommentsException".
//
// This exception is thrown when the document is locked for comments and user
// tries to create or delete a comment on that document.
ErrCodeDocumentLockedForCommentsException = "DocumentLockedForCommentsException"
// ErrCodeDraftUploadOutOfSyncException for service response error code
// "DraftUploadOutOfSyncException".
//
// This exception is thrown when a valid checkout ID is not presented on document
// version upload calls for a document that has been checked out from Web client.
ErrCodeDraftUploadOutOfSyncException = "DraftUploadOutOfSyncException"
// ErrCodeEntityAlreadyExistsException for service response error code
// "EntityAlreadyExistsException".
//
// The resource already exists.
ErrCodeEntityAlreadyExistsException = "EntityAlreadyExistsException"
// ErrCodeEntityNotExistsException for service response error code
// "EntityNotExistsException".
//
// The resource does not exist.
ErrCodeEntityNotExistsException = "EntityNotExistsException"
// ErrCodeFailedDependencyException for service response error code
// "FailedDependencyException".
//
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
ErrCodeFailedDependencyException = "FailedDependencyException"
// ErrCodeIllegalUserStateException for service response error code
// "IllegalUserStateException".
//
// The user is undergoing transfer of ownership.
ErrCodeIllegalUserStateException = "IllegalUserStateException"
// ErrCodeInvalidArgumentException for service response error code
// "InvalidArgumentException".
//
// The pagination marker or limit fields are not valid.
ErrCodeInvalidArgumentException = "InvalidArgumentException"
// ErrCodeInvalidCommentOperationException for service response error code
// "InvalidCommentOperationException".
//
// The requested operation is not allowed on the specified comment object.
ErrCodeInvalidCommentOperationException = "InvalidCommentOperationException"
// ErrCodeInvalidOperationException for service response error code
// "InvalidOperationException".
//
// The operation is invalid.
ErrCodeInvalidOperationException = "InvalidOperationException"
// ErrCodeInvalidPasswordException for service response error code
// "InvalidPasswordException".
//
// The password is invalid.
ErrCodeInvalidPasswordException = "InvalidPasswordException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// The maximum of 100,000 folders under the parent folder has been exceeded.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeProhibitedStateException for service response error code
// "ProhibitedStateException".
//
// The specified document version is not in the INITIALIZED state.
ErrCodeProhibitedStateException = "ProhibitedStateException"
// ErrCodeRequestedEntityTooLargeException for service response error code
// "RequestedEntityTooLargeException".
//
// The response is too large to return. The request must include a filter to
// reduce the size of the response.
ErrCodeRequestedEntityTooLargeException = "RequestedEntityTooLargeException"
// ErrCodeResourceAlreadyCheckedOutException for service response error code
// "ResourceAlreadyCheckedOutException".
//
// The resource is already checked out.
ErrCodeResourceAlreadyCheckedOutException = "ResourceAlreadyCheckedOutException"
// ErrCodeServiceUnavailableException for service response error code
// "ServiceUnavailableException".
//
// One or more of the dependencies is unavailable.
ErrCodeServiceUnavailableException = "ServiceUnavailableException"
// ErrCodeStorageLimitExceededException for service response error code
// "StorageLimitExceededException".
//
// The storage limit has been exceeded.
ErrCodeStorageLimitExceededException = "StorageLimitExceededException"
// ErrCodeStorageLimitWillExceedException for service response error code
// "StorageLimitWillExceedException".
//
// The storage limit will be exceeded.
ErrCodeStorageLimitWillExceedException = "StorageLimitWillExceedException"
// ErrCodeTooManyLabelsException for service response error code
// "TooManyLabelsException".
//
// The limit has been reached on the number of labels for the specified resource.
ErrCodeTooManyLabelsException = "TooManyLabelsException"
// ErrCodeTooManySubscriptionsException for service response error code
// "TooManySubscriptionsException".
//
// You've reached the limit on the number of subscriptions for the WorkDocs
// instance.
ErrCodeTooManySubscriptionsException = "TooManySubscriptionsException"
// ErrCodeUnauthorizedOperationException for service response error code
// "UnauthorizedOperationException".
//
// The operation is not permitted.
ErrCodeUnauthorizedOperationException = "UnauthorizedOperationException"
// ErrCodeUnauthorizedResourceAccessException for service response error code
// "UnauthorizedResourceAccessException".
//
// The caller does not have access to perform the action on the resource.
ErrCodeUnauthorizedResourceAccessException = "UnauthorizedResourceAccessException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"ConcurrentModificationException": newErrorConcurrentModificationException,
"ConflictingOperationException": newErrorConflictingOperationException,
"CustomMetadataLimitExceededException": newErrorCustomMetadataLimitExceededException,
"DeactivatingLastSystemUserException": newErrorDeactivatingLastSystemUserException,
"DocumentLockedForCommentsException": newErrorDocumentLockedForCommentsException,
"DraftUploadOutOfSyncException": newErrorDraftUploadOutOfSyncException,
"EntityAlreadyExistsException": newErrorEntityAlreadyExistsException,
"EntityNotExistsException": newErrorEntityNotExistsException,
"FailedDependencyException": newErrorFailedDependencyException,
"IllegalUserStateException": newErrorIllegalUserStateException,
"InvalidArgumentException": newErrorInvalidArgumentException,
"InvalidCommentOperationException": newErrorInvalidCommentOperationException,
"InvalidOperationException": newErrorInvalidOperationException,
"InvalidPasswordException": newErrorInvalidPasswordException,
"LimitExceededException": newErrorLimitExceededException,
"ProhibitedStateException": newErrorProhibitedStateException,
"RequestedEntityTooLargeException": newErrorRequestedEntityTooLargeException,
"ResourceAlreadyCheckedOutException": newErrorResourceAlreadyCheckedOutException,
"ServiceUnavailableException": newErrorServiceUnavailableException,
"StorageLimitExceededException": newErrorStorageLimitExceededException,
"StorageLimitWillExceedException": newErrorStorageLimitWillExceedException,
"TooManyLabelsException": newErrorTooManyLabelsException,
"TooManySubscriptionsException": newErrorTooManySubscriptionsException,
"UnauthorizedOperationException": newErrorUnauthorizedOperationException,
"UnauthorizedResourceAccessException": newErrorUnauthorizedResourceAccessException,
}