-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
74 lines (62 loc) · 2.95 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package glacier
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeInsufficientCapacityException for service response error code
// "InsufficientCapacityException".
//
// Returned if there is insufficient capacity to process this expedited request.
// This error only applies to expedited retrievals and not to standard or bulk
// retrievals.
ErrCodeInsufficientCapacityException = "InsufficientCapacityException"
// ErrCodeInvalidParameterValueException for service response error code
// "InvalidParameterValueException".
//
// Returned if a parameter of the request is incorrectly specified.
ErrCodeInvalidParameterValueException = "InvalidParameterValueException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// Returned if the request results in a vault or account limit being exceeded.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeMissingParameterValueException for service response error code
// "MissingParameterValueException".
//
// Returned if a required header or parameter is missing from the request.
ErrCodeMissingParameterValueException = "MissingParameterValueException"
// ErrCodePolicyEnforcedException for service response error code
// "PolicyEnforcedException".
//
// Returned if a retrieval job would exceed the current data policy's retrieval
// rate limit. For more information about data retrieval policies,
ErrCodePolicyEnforcedException = "PolicyEnforcedException"
// ErrCodeRequestTimeoutException for service response error code
// "RequestTimeoutException".
//
// Returned if, when uploading an archive, Amazon S3 Glacier times out while
// receiving the upload.
ErrCodeRequestTimeoutException = "RequestTimeoutException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// Returned if the specified resource (such as a vault, upload ID, or job ID)
// doesn't exist.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeServiceUnavailableException for service response error code
// "ServiceUnavailableException".
//
// Returned if the service cannot complete the request.
ErrCodeServiceUnavailableException = "ServiceUnavailableException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"InsufficientCapacityException": newErrorInsufficientCapacityException,
"InvalidParameterValueException": newErrorInvalidParameterValueException,
"LimitExceededException": newErrorLimitExceededException,
"MissingParameterValueException": newErrorMissingParameterValueException,
"PolicyEnforcedException": newErrorPolicyEnforcedException,
"RequestTimeoutException": newErrorRequestTimeoutException,
"ResourceNotFoundException": newErrorResourceNotFoundException,
"ServiceUnavailableException": newErrorServiceUnavailableException,
}