1
0

Added http.Error() to a PlaylistNext() handler.

This commit is contained in:
Alexander Andreev 2023-10-02 02:29:18 +04:00
parent f709ac4b02
commit d2851c6fb8
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -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_{