-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patherrors.go
More file actions
99 lines (91 loc) · 4.56 KB
/
Copy patherrors.go
File metadata and controls
99 lines (91 loc) · 4.56 KB
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
package waxtap
import "github.com/colespringer/waxtap/v3/waxerr"
// Re-exported sentinel errors. The canonical definitions live in package waxerr;
// match them with errors.Is.
var (
// YouTube extraction maintenance signals.
ErrExtractionFailed = waxerr.ErrExtractionFailed
ErrCipherSolve = waxerr.ErrCipherSolve
ErrNeedsPOToken = waxerr.ErrNeedsPOToken
ErrURLExpired = waxerr.ErrURLExpired
// ErrIncompleteStream indicates that a client returned a detectably truncated
// stream. Another client may still deliver the complete stream.
ErrIncompleteStream = waxerr.ErrIncompleteStream
// Availability failures.
ErrVideoUnavailable = waxerr.ErrVideoUnavailable
ErrVideoRestricted = waxerr.ErrVideoRestricted
ErrLoginRequired = waxerr.ErrLoginRequired
// ErrLiveContent indicates a stream that is currently live; ErrLiveNotStarted
// indicates an upcoming/premiere or offline stream that may become available.
ErrLiveContent = waxerr.ErrLiveContent
ErrLiveNotStarted = waxerr.ErrLiveNotStarted
// ErrAgeRestricted, ErrMembersOnly, and ErrGeoBlocked are specific availability
// verdicts. The token-free native clients leading the default chain have
// bypassed age-gating in testing, so ErrAgeRestricted is near-unreachable
// unless a stricter client is forced.
ErrAgeRestricted = waxerr.ErrAgeRestricted
ErrMembersOnly = waxerr.ErrMembersOnly
ErrGeoBlocked = waxerr.ErrGeoBlocked
ErrNoAudioFormats = waxerr.ErrNoAudioFormats
// ErrRequestedFormatUnavailable indicates an explicit itag/codec selector
// matched none of the available audio formats. It is distinct from
// ErrNoAudioFormats, which means no usable audio formats exist.
ErrRequestedFormatUnavailable = waxerr.ErrRequestedFormatUnavailable
// Throttling.
ErrRateLimited = waxerr.ErrRateLimited
// ErrTemporarilyUnavailable marks a playlist entry the metadata throttle
// refused and the rotation-and-retry escape could not settle before its
// budget ran out. It is not an availability verdict: skipping on it
// permanently drops videos that are very likely fine; retry in a later run.
ErrTemporarilyUnavailable = waxerr.ErrTemporarilyUnavailable
// Input / routing.
ErrIsPlaylist = waxerr.ErrIsPlaylist
// ErrIsChannel indicates a channel URL was passed where a single video is
// required.
ErrIsChannel = waxerr.ErrIsChannel
ErrInvalidVideoID = waxerr.ErrInvalidVideoID
// ErrVideoIDTooShort and ErrVideoIDTooLong indicate an all-ID-character token
// of the wrong length (a video ID is exactly 11 characters).
ErrVideoIDTooShort = waxerr.ErrVideoIDTooShort
ErrVideoIDTooLong = waxerr.ErrVideoIDTooLong
ErrInvalidPlaylistID = waxerr.ErrInvalidPlaylistID
// ErrPlaylistParse is a maintenance signal, not a bad input: the playlist
// response parsed but matched no known shape.
ErrPlaylistParse = waxerr.ErrPlaylistParse
// ErrPlaylistUnavailable indicates that a playlist is private, deleted, or
// otherwise inaccessible. See [PlaylistUnavailableError].
ErrPlaylistUnavailable = waxerr.ErrPlaylistUnavailable
// ErrPlaylistEmpty indicates that a valid playlist contains no videos.
ErrPlaylistEmpty = waxerr.ErrPlaylistEmpty
// ErrShortsPlaylist indicates that WaxTap cannot enumerate a channel's Shorts
// shelf playlist. It wraps [ErrUnsupportedInput].
ErrShortsPlaylist = waxerr.ErrShortsPlaylist
// Processing / local files.
ErrIncompatibleSpec = waxerr.ErrIncompatibleSpec
ErrUnsupportedInput = waxerr.ErrUnsupportedInput
// ErrInvalidConfig indicates invalid or conflicting library configuration.
ErrInvalidConfig = waxerr.ErrInvalidConfig
)
// Re-exported structured error types. Inspect them with errors.AsType, or with
// errors.As using a double-pointer target: each satisfies error on its pointer
// type (like *os.PathError), so the value form errors.As(err, &PlayabilityError{})
// panics. Use:
//
// var pe *PlayabilityError
// if errors.As(err, &pe) { /* pe.Status, pe.Reason */ }
//
// equivalently errors.AsType[*PlayabilityError](err).
type (
RateLimitError = waxerr.RateLimitError
ExtractionError = waxerr.ExtractionError
PlayabilityError = waxerr.PlayabilityError
HTTPStatusError = waxerr.HTTPStatusError
// ProviderError reports a failed player-context or session provider call.
ProviderError = waxerr.ProviderError
// RequestedFormatError reports that an explicit itag/codec selector matched no
// available audio format and lists the available alternatives.
RequestedFormatError = waxerr.RequestedFormatError
// PlaylistUnavailableError reports why YouTube considers a playlist
// inaccessible.
PlaylistUnavailableError = waxerr.PlaylistUnavailableError
)