Skip to content

Commit

Permalink
youtube: Ignore 404's from DeArrow
Browse files Browse the repository at this point in the history
  • Loading branch information
Brawl345 committed Jan 14, 2024
1 parent 94e27dc commit 6c2235f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/youtube/youtube.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func deArrow(originalText string, video *Video) (string, error) {

if err != nil {
if errors.As(err, &httpError) {
if httpError.StatusCode == 500 { // API seems to throw 500 for every empty response
if httpError.StatusCode == 500 || httpError.StatusCode == 404 { // API seems to throw 500 for some empty responses
return "", nil
}
}
Expand Down

0 comments on commit 6c2235f

Please sign in to comment.