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 (97 lines) | stat: -rw-r--r-- 4,136 bytes parent folder | download
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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.

package iotsitewise

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

const (

	// ErrCodeConflictingOperationException for service response error code
	// "ConflictingOperationException".
	//
	// Your request has conflicting operations. This can occur if you're trying
	// to perform more than one operation on the same resource at the same time.
	ErrCodeConflictingOperationException = "ConflictingOperationException"

	// ErrCodeInternalFailureException for service response error code
	// "InternalFailureException".
	//
	// IoT SiteWise can't process your request right now. Try again later.
	ErrCodeInternalFailureException = "InternalFailureException"

	// ErrCodeInvalidRequestException for service response error code
	// "InvalidRequestException".
	//
	// The request isn't valid. This can occur if your request contains malformed
	// JSON or unsupported characters. Check your request and try again.
	ErrCodeInvalidRequestException = "InvalidRequestException"

	// ErrCodeLimitExceededException for service response error code
	// "LimitExceededException".
	//
	// You've reached the limit for a resource. For example, this can occur if you're
	// trying to associate more than the allowed number of child assets or attempting
	// to create more than the allowed number of properties for an asset model.
	//
	// For more information, see Quotas (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html)
	// in the IoT SiteWise User Guide.
	ErrCodeLimitExceededException = "LimitExceededException"

	// ErrCodeResourceAlreadyExistsException for service response error code
	// "ResourceAlreadyExistsException".
	//
	// The resource already exists.
	ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException"

	// ErrCodeResourceNotFoundException for service response error code
	// "ResourceNotFoundException".
	//
	// The requested resource can't be found.
	ErrCodeResourceNotFoundException = "ResourceNotFoundException"

	// ErrCodeServiceUnavailableException for service response error code
	// "ServiceUnavailableException".
	//
	// The requested service is unavailable.
	ErrCodeServiceUnavailableException = "ServiceUnavailableException"

	// ErrCodeThrottlingException for service response error code
	// "ThrottlingException".
	//
	// Your request exceeded a rate limit. For example, you might have exceeded
	// the number of IoT SiteWise assets that can be created per second, the allowed
	// number of messages per second, and so on.
	//
	// For more information, see Quotas (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html)
	// in the IoT SiteWise User Guide.
	ErrCodeThrottlingException = "ThrottlingException"

	// ErrCodeTooManyTagsException for service response error code
	// "TooManyTagsException".
	//
	// You've reached the limit for the number of tags allowed for a resource. For
	// more information, see Tag naming limits and requirements (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html#tag-conventions)
	// in the Amazon Web Services General Reference.
	ErrCodeTooManyTagsException = "TooManyTagsException"

	// ErrCodeUnauthorizedException for service response error code
	// "UnauthorizedException".
	//
	// You are not authorized.
	ErrCodeUnauthorizedException = "UnauthorizedException"
)

var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
	"ConflictingOperationException":  newErrorConflictingOperationException,
	"InternalFailureException":       newErrorInternalFailureException,
	"InvalidRequestException":        newErrorInvalidRequestException,
	"LimitExceededException":         newErrorLimitExceededException,
	"ResourceAlreadyExistsException": newErrorResourceAlreadyExistsException,
	"ResourceNotFoundException":      newErrorResourceNotFoundException,
	"ServiceUnavailableException":    newErrorServiceUnavailableException,
	"ThrottlingException":            newErrorThrottlingException,
	"TooManyTagsException":           newErrorTooManyTagsException,
	"UnauthorizedException":          newErrorUnauthorizedException,
}