-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
85 lines (71 loc) · 3.2 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package bedrockruntime
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeAccessDeniedException for service response error code
// "AccessDeniedException".
//
// The request is denied because of missing access permissions.
ErrCodeAccessDeniedException = "AccessDeniedException"
// ErrCodeInternalServerException for service response error code
// "InternalServerException".
//
// An internal server error occurred. Retry your request.
ErrCodeInternalServerException = "InternalServerException"
// ErrCodeModelErrorException for service response error code
// "ModelErrorException".
//
// The request failed due to an error while processing the model.
ErrCodeModelErrorException = "ModelErrorException"
// ErrCodeModelNotReadyException for service response error code
// "ModelNotReadyException".
//
// The model specified in the request is not ready to serve inference requests.
ErrCodeModelNotReadyException = "ModelNotReadyException"
// ErrCodeModelStreamErrorException for service response error code
// "ModelStreamErrorException".
//
// An error occurred while streaming the response. Retry your request.
ErrCodeModelStreamErrorException = "ModelStreamErrorException"
// ErrCodeModelTimeoutException for service response error code
// "ModelTimeoutException".
//
// The request took too long to process. Processing time exceeded the model
// timeout length.
ErrCodeModelTimeoutException = "ModelTimeoutException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// The specified resource ARN was not found. Check the ARN and try your request
// again.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeServiceQuotaExceededException for service response error code
// "ServiceQuotaExceededException".
//
// The number of requests exceeds the service quota. Resubmit your request later.
ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException"
// ErrCodeThrottlingException for service response error code
// "ThrottlingException".
//
// The number of requests exceeds the limit. Resubmit your request later.
ErrCodeThrottlingException = "ThrottlingException"
// ErrCodeValidationException for service response error code
// "ValidationException".
//
// Input validation failed. Check your request parameters and retry the request.
ErrCodeValidationException = "ValidationException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"AccessDeniedException": newErrorAccessDeniedException,
"InternalServerException": newErrorInternalServerException,
"ModelErrorException": newErrorModelErrorException,
"ModelNotReadyException": newErrorModelNotReadyException,
"ModelStreamErrorException": newErrorModelStreamErrorException,
"ModelTimeoutException": newErrorModelTimeoutException,
"ResourceNotFoundException": newErrorResourceNotFoundException,
"ServiceQuotaExceededException": newErrorServiceQuotaExceededException,
"ThrottlingException": newErrorThrottlingException,
"ValidationException": newErrorValidationException,
}