File: errors.go

package info (click to toggle)
golang-github-aws-aws-sdk-go 1.44.133-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-proposed-updates
  • size: 245,296 kB
  • sloc: makefile: 120
file content (103 lines) | stat: -rw-r--r-- 4,446 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
103
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.

package swf

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

const (

	// ErrCodeDefaultUndefinedFault for service response error code
	// "DefaultUndefinedFault".
	//
	// The StartWorkflowExecution API action was called without the required parameters
	// set.
	//
	// Some workflow execution parameters, such as the decision taskList, must be
	// set to start the execution. However, these parameters might have been set
	// as defaults when the workflow type was registered. In this case, you can
	// omit these parameters from the StartWorkflowExecution call and Amazon SWF
	// uses the values defined in the workflow type.
	//
	// If these parameters aren't set and no default parameters were defined in
	// the workflow type, this error is displayed.
	ErrCodeDefaultUndefinedFault = "DefaultUndefinedFault"

	// ErrCodeDomainAlreadyExistsFault for service response error code
	// "DomainAlreadyExistsFault".
	//
	// Returned if the domain already exists. You may get this fault if you are
	// registering a domain that is either already registered or deprecated, or
	// if you undeprecate a domain that is currently registered.
	ErrCodeDomainAlreadyExistsFault = "DomainAlreadyExistsFault"

	// ErrCodeDomainDeprecatedFault for service response error code
	// "DomainDeprecatedFault".
	//
	// Returned when the specified domain has been deprecated.
	ErrCodeDomainDeprecatedFault = "DomainDeprecatedFault"

	// ErrCodeLimitExceededFault for service response error code
	// "LimitExceededFault".
	//
	// Returned by any operation if a system imposed limitation has been reached.
	// To address this fault you should either clean up unused resources or increase
	// the limit by contacting AWS.
	ErrCodeLimitExceededFault = "LimitExceededFault"

	// ErrCodeOperationNotPermittedFault for service response error code
	// "OperationNotPermittedFault".
	//
	// Returned when the caller doesn't have sufficient permissions to invoke the
	// action.
	ErrCodeOperationNotPermittedFault = "OperationNotPermittedFault"

	// ErrCodeTooManyTagsFault for service response error code
	// "TooManyTagsFault".
	//
	// You've exceeded the number of tags allowed for a domain.
	ErrCodeTooManyTagsFault = "TooManyTagsFault"

	// ErrCodeTypeAlreadyExistsFault for service response error code
	// "TypeAlreadyExistsFault".
	//
	// Returned if the type already exists in the specified domain. You may get
	// this fault if you are registering a type that is either already registered
	// or deprecated, or if you undeprecate a type that is currently registered.
	ErrCodeTypeAlreadyExistsFault = "TypeAlreadyExistsFault"

	// ErrCodeTypeDeprecatedFault for service response error code
	// "TypeDeprecatedFault".
	//
	// Returned when the specified activity or workflow type was already deprecated.
	ErrCodeTypeDeprecatedFault = "TypeDeprecatedFault"

	// ErrCodeUnknownResourceFault for service response error code
	// "UnknownResourceFault".
	//
	// Returned when the named resource cannot be found with in the scope of this
	// operation (region or domain). This could happen if the named resource was
	// never created or is no longer available for this operation.
	ErrCodeUnknownResourceFault = "UnknownResourceFault"

	// ErrCodeWorkflowExecutionAlreadyStartedFault for service response error code
	// "WorkflowExecutionAlreadyStartedFault".
	//
	// Returned by StartWorkflowExecution when an open execution with the same workflowId
	// is already running in the specified domain.
	ErrCodeWorkflowExecutionAlreadyStartedFault = "WorkflowExecutionAlreadyStartedFault"
)

var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
	"DefaultUndefinedFault":                newErrorDefaultUndefinedFault,
	"DomainAlreadyExistsFault":             newErrorDomainAlreadyExistsFault,
	"DomainDeprecatedFault":                newErrorDomainDeprecatedFault,
	"LimitExceededFault":                   newErrorLimitExceededFault,
	"OperationNotPermittedFault":           newErrorOperationNotPermittedFault,
	"TooManyTagsFault":                     newErrorTooManyTagsFault,
	"TypeAlreadyExistsFault":               newErrorTypeAlreadyExistsFault,
	"TypeDeprecatedFault":                  newErrorTypeDeprecatedFault,
	"UnknownResourceFault":                 newErrorUnknownResourceFault,
	"WorkflowExecutionAlreadyStartedFault": newErrorWorkflowExecutionAlreadyStartedFault,
}