-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
93 lines (80 loc) · 4.15 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package kinesisvideoarchivedmedia
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeClientLimitExceededException for service response error code
// "ClientLimitExceededException".
//
// Kinesis Video Streams has throttled the request because you have exceeded
// a limit. Try making the call later. For information about limits, see Kinesis
// Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html).
ErrCodeClientLimitExceededException = "ClientLimitExceededException"
// ErrCodeInvalidArgumentException for service response error code
// "InvalidArgumentException".
//
// A specified parameter exceeds its restrictions, is not supported, or can't
// be used.
ErrCodeInvalidArgumentException = "InvalidArgumentException"
// ErrCodeInvalidCodecPrivateDataException for service response error code
// "InvalidCodecPrivateDataException".
//
// The codec private data in at least one of the tracks of the video stream
// is not valid for this operation.
ErrCodeInvalidCodecPrivateDataException = "InvalidCodecPrivateDataException"
// ErrCodeInvalidMediaFrameException for service response error code
// "InvalidMediaFrameException".
//
// One or more frames in the requested clip could not be parsed based on the
// specified codec.
ErrCodeInvalidMediaFrameException = "InvalidMediaFrameException"
// ErrCodeMissingCodecPrivateDataException for service response error code
// "MissingCodecPrivateDataException".
//
// No codec private data was found in at least one of tracks of the video stream.
ErrCodeMissingCodecPrivateDataException = "MissingCodecPrivateDataException"
// ErrCodeNoDataRetentionException for service response error code
// "NoDataRetentionException".
//
// A streaming session was requested for a stream that does not retain data
// (that is, has a DataRetentionInHours of 0).
ErrCodeNoDataRetentionException = "NoDataRetentionException"
// ErrCodeNotAuthorizedException for service response error code
// "NotAuthorizedException".
//
// Status Code: 403, The caller is not authorized to perform an operation on
// the given stream, or the token has expired.
ErrCodeNotAuthorizedException = "NotAuthorizedException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// GetMedia throws this error when Kinesis Video Streams can't find the stream
// that you specified.
//
// GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error
// if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested
// for a stream that has no fragments within the requested time range, or if
// a session with a PlaybackMode of LIVE is requested for a stream that has
// no fragments within the last 30 seconds.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeUnsupportedStreamMediaTypeException for service response error code
// "UnsupportedStreamMediaTypeException".
//
// The type of the media (for example, h.264 or h.265 video or ACC or G.711
// audio) could not be determined from the codec IDs of the tracks in the first
// fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC
// and, optionally, the codec ID for track 2 should be A_AAC.
ErrCodeUnsupportedStreamMediaTypeException = "UnsupportedStreamMediaTypeException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"ClientLimitExceededException": newErrorClientLimitExceededException,
"InvalidArgumentException": newErrorInvalidArgumentException,
"InvalidCodecPrivateDataException": newErrorInvalidCodecPrivateDataException,
"InvalidMediaFrameException": newErrorInvalidMediaFrameException,
"MissingCodecPrivateDataException": newErrorMissingCodecPrivateDataException,
"NoDataRetentionException": newErrorNoDataRetentionException,
"NotAuthorizedException": newErrorNotAuthorizedException,
"ResourceNotFoundException": newErrorResourceNotFoundException,
"UnsupportedStreamMediaTypeException": newErrorUnsupportedStreamMediaTypeException,
}