File: errors.go

package info (click to toggle)
golang-github-aws-aws-sdk-go 1.49.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 312,636 kB
  • sloc: makefile: 120
file content (102 lines) | stat: -rw-r--r-- 3,837 bytes parent folder | download | duplicates (3)
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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.

package lexruntimeservice

import (
	"github.com/aws/aws-sdk-go/private/protocol"
)

const (

	// ErrCodeBadGatewayException for service response error code
	// "BadGatewayException".
	//
	// Either the Amazon Lex bot is still building, or one of the dependent services
	// (Amazon Polly, AWS Lambda) failed with an internal service error.
	ErrCodeBadGatewayException = "BadGatewayException"

	// ErrCodeBadRequestException for service response error code
	// "BadRequestException".
	//
	// Request validation failed, there is no usable message in the context, or
	// the bot build failed, is still in progress, or contains unbuilt changes.
	ErrCodeBadRequestException = "BadRequestException"

	// ErrCodeConflictException for service response error code
	// "ConflictException".
	//
	// Two clients are using the same AWS account, Amazon Lex bot, and user ID.
	ErrCodeConflictException = "ConflictException"

	// ErrCodeDependencyFailedException for service response error code
	// "DependencyFailedException".
	//
	// One of the dependencies, such as AWS Lambda or Amazon Polly, threw an exception.
	// For example,
	//
	//    * If Amazon Lex does not have sufficient permissions to call a Lambda
	//    function.
	//
	//    * If a Lambda function takes longer than 30 seconds to execute.
	//
	//    * If a fulfillment Lambda function returns a Delegate dialog action without
	//    removing any slot values.
	ErrCodeDependencyFailedException = "DependencyFailedException"

	// ErrCodeInternalFailureException for service response error code
	// "InternalFailureException".
	//
	// Internal service error. Retry the call.
	ErrCodeInternalFailureException = "InternalFailureException"

	// ErrCodeLimitExceededException for service response error code
	// "LimitExceededException".
	//
	// Exceeded a limit.
	ErrCodeLimitExceededException = "LimitExceededException"

	// ErrCodeLoopDetectedException for service response error code
	// "LoopDetectedException".
	//
	// This exception is not used.
	ErrCodeLoopDetectedException = "LoopDetectedException"

	// ErrCodeNotAcceptableException for service response error code
	// "NotAcceptableException".
	//
	// The accept header in the request does not have a valid value.
	ErrCodeNotAcceptableException = "NotAcceptableException"

	// ErrCodeNotFoundException for service response error code
	// "NotFoundException".
	//
	// The resource (such as the Amazon Lex bot or an alias) that is referred to
	// is not found.
	ErrCodeNotFoundException = "NotFoundException"

	// ErrCodeRequestTimeoutException for service response error code
	// "RequestTimeoutException".
	//
	// The input speech is too long.
	ErrCodeRequestTimeoutException = "RequestTimeoutException"

	// ErrCodeUnsupportedMediaTypeException for service response error code
	// "UnsupportedMediaTypeException".
	//
	// The Content-Type header (PostContent API) has an invalid value.
	ErrCodeUnsupportedMediaTypeException = "UnsupportedMediaTypeException"
)

var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
	"BadGatewayException":           newErrorBadGatewayException,
	"BadRequestException":           newErrorBadRequestException,
	"ConflictException":             newErrorConflictException,
	"DependencyFailedException":     newErrorDependencyFailedException,
	"InternalFailureException":      newErrorInternalFailureException,
	"LimitExceededException":        newErrorLimitExceededException,
	"LoopDetectedException":         newErrorLoopDetectedException,
	"NotAcceptableException":        newErrorNotAcceptableException,
	"NotFoundException":             newErrorNotFoundException,
	"RequestTimeoutException":       newErrorRequestTimeoutException,
	"UnsupportedMediaTypeException": newErrorUnsupportedMediaTypeException,
}