/
errors.go
132 lines (113 loc) · 4.97 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package rdsdataservice
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeAccessDeniedException for service response error code
// "AccessDeniedException".
//
// You don't have sufficient access to perform this action.
ErrCodeAccessDeniedException = "AccessDeniedException"
// ErrCodeBadRequestException for service response error code
// "BadRequestException".
//
// There is an error in the call or in a SQL statement. (This error only appears
// in calls from Aurora Serverless v1 databases.)
ErrCodeBadRequestException = "BadRequestException"
// ErrCodeDatabaseErrorException for service response error code
// "DatabaseErrorException".
//
// There was an error in processing the SQL statement.
ErrCodeDatabaseErrorException = "DatabaseErrorException"
// ErrCodeDatabaseNotFoundException for service response error code
// "DatabaseNotFoundException".
//
// The DB cluster doesn't have a DB instance.
ErrCodeDatabaseNotFoundException = "DatabaseNotFoundException"
// ErrCodeDatabaseUnavailableException for service response error code
// "DatabaseUnavailableException".
//
// The writer instance in the DB cluster isn't available.
ErrCodeDatabaseUnavailableException = "DatabaseUnavailableException"
// ErrCodeForbiddenException for service response error code
// "ForbiddenException".
//
// There are insufficient privileges to make the call.
ErrCodeForbiddenException = "ForbiddenException"
// ErrCodeHttpEndpointNotEnabledException for service response error code
// "HttpEndpointNotEnabledException".
//
// The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.
ErrCodeHttpEndpointNotEnabledException = "HttpEndpointNotEnabledException"
// ErrCodeInternalServerErrorException for service response error code
// "InternalServerErrorException".
//
// An internal error occurred.
ErrCodeInternalServerErrorException = "InternalServerErrorException"
// ErrCodeInvalidSecretException for service response error code
// "InvalidSecretException".
//
// The Secrets Manager secret used with the request isn't valid.
ErrCodeInvalidSecretException = "InvalidSecretException"
// ErrCodeNotFoundException for service response error code
// "NotFoundException".
//
// The resourceArn, secretArn, or transactionId value can't be found.
ErrCodeNotFoundException = "NotFoundException"
// ErrCodeSecretsErrorException for service response error code
// "SecretsErrorException".
//
// There was a problem with the Secrets Manager secret used with the request,
// caused by one of the following conditions:
//
// * RDS Data API timed out retrieving the secret.
//
// * The secret provided wasn't found.
//
// * The secret couldn't be decrypted.
ErrCodeSecretsErrorException = "SecretsErrorException"
// ErrCodeServiceUnavailableError for service response error code
// "ServiceUnavailableError".
//
// The service specified by the resourceArn parameter isn't available.
ErrCodeServiceUnavailableError = "ServiceUnavailableError"
// ErrCodeStatementTimeoutException for service response error code
// "StatementTimeoutException".
//
// The execution of the SQL statement timed out.
ErrCodeStatementTimeoutException = "StatementTimeoutException"
// ErrCodeTransactionNotFoundException for service response error code
// "TransactionNotFoundException".
//
// The transaction ID wasn't found.
ErrCodeTransactionNotFoundException = "TransactionNotFoundException"
// ErrCodeUnsupportedResultException for service response error code
// "UnsupportedResultException".
//
// There was a problem with the result because of one of the following conditions:
//
// * It contained an unsupported data type.
//
// * It contained a multidimensional array.
//
// * The size was too large.
ErrCodeUnsupportedResultException = "UnsupportedResultException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"AccessDeniedException": newErrorAccessDeniedException,
"BadRequestException": newErrorBadRequestException,
"DatabaseErrorException": newErrorDatabaseErrorException,
"DatabaseNotFoundException": newErrorDatabaseNotFoundException,
"DatabaseUnavailableException": newErrorDatabaseUnavailableException,
"ForbiddenException": newErrorForbiddenException,
"HttpEndpointNotEnabledException": newErrorHttpEndpointNotEnabledException,
"InternalServerErrorException": newErrorInternalServerErrorException,
"InvalidSecretException": newErrorInvalidSecretException,
"NotFoundException": newErrorNotFoundException,
"SecretsErrorException": newErrorSecretsErrorException,
"ServiceUnavailableError": newErrorServiceUnavailableError,
"StatementTimeoutException": newErrorStatementTimeoutException,
"TransactionNotFoundException": newErrorTransactionNotFoundException,
"UnsupportedResultException": newErrorUnsupportedResultException,
}