all repos — fixyoutube-go @ ca543233e814d5ac68644a39d8de37ee43f2119f

A better way to embed YouTube videos everywhere (inspired by FixTweet).

handle invidious error 403
Bi-Rabittoh andronacomarco@gmail.com
Sun, 18 Feb 2024 12:55:52 +0100
commit

ca543233e814d5ac68644a39d8de37ee43f2119f

parent

e5d3a294978dc487d4848f9d17872348f7297a24

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M invidious/api.goinvidious/api.go

@@ -28,6 +28,9 @@ defer resp.Body.Close()

if resp.StatusCode != http.StatusOK { logger.Warn("Invidious gave the following status code: ", resp.StatusCode) + if resp.StatusCode == http.StatusForbidden { + return nil, http.StatusInternalServerError + } return nil, http.StatusNotFound }