/
errors.go
67 lines (56 loc) · 2.58 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package iotjobsdataplane
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeCertificateValidationException for service response error code
// "CertificateValidationException".
//
// The certificate is invalid.
ErrCodeCertificateValidationException = "CertificateValidationException"
// ErrCodeInvalidRequestException for service response error code
// "InvalidRequestException".
//
// The contents of the request were invalid. For example, this code is returned
// when an UpdateJobExecution request contains invalid status details. The message
// contains details about the error.
ErrCodeInvalidRequestException = "InvalidRequestException"
// ErrCodeInvalidStateTransitionException for service response error code
// "InvalidStateTransitionException".
//
// An update attempted to change the job execution to a state that is invalid
// because of the job execution's current state (for example, an attempt to
// change a request in state SUCCESS to state IN_PROGRESS). In this case, the
// body of the error message also contains the executionState field.
ErrCodeInvalidStateTransitionException = "InvalidStateTransitionException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// The specified resource does not exist.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeServiceUnavailableException for service response error code
// "ServiceUnavailableException".
//
// The service is temporarily unavailable.
ErrCodeServiceUnavailableException = "ServiceUnavailableException"
// ErrCodeTerminalStateException for service response error code
// "TerminalStateException".
//
// The job is in a terminal state.
ErrCodeTerminalStateException = "TerminalStateException"
// ErrCodeThrottlingException for service response error code
// "ThrottlingException".
//
// The rate exceeds the limit.
ErrCodeThrottlingException = "ThrottlingException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"CertificateValidationException": newErrorCertificateValidationException,
"InvalidRequestException": newErrorInvalidRequestException,
"InvalidStateTransitionException": newErrorInvalidStateTransitionException,
"ResourceNotFoundException": newErrorResourceNotFoundException,
"ServiceUnavailableException": newErrorServiceUnavailableException,
"TerminalStateException": newErrorTerminalStateException,
"ThrottlingException": newErrorThrottlingException,
}