From d2851c6fb818773649f19d07a52e85e63e22b402 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 2 Oct 2023 02:29:18 +0400 Subject: [PATCH] Added http.Error() to a PlaylistNext() handler. --- internal/http/dj_handlers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/http/dj_handlers.go b/internal/http/dj_handlers.go index d0d7aaf..6def03b 100644 --- a/internal/http/dj_handlers.go +++ b/internal/http/dj_handlers.go @@ -60,6 +60,8 @@ func (dj *DJHandlers) PlaylistNext(w http.ResponseWriter, _ *http.Request) { bs, be, err := oggtag.ReadFile(nxt) if err != nil { log.Println("cannot read an OGG file", nxt, ":", err) + http.Error(w, "cannot read an OGG file", http.StatusInternalServerError) + return } song := radio.Song_{