Added http.Error() to a PlaylistNext() handler.
This commit is contained in:
parent
f709ac4b02
commit
d2851c6fb8
@ -60,6 +60,8 @@ func (dj *DJHandlers) PlaylistNext(w http.ResponseWriter, _ *http.Request) {
|
|||||||
bs, be, err := oggtag.ReadFile(nxt)
|
bs, be, err := oggtag.ReadFile(nxt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("cannot read an OGG file", nxt, ":", err)
|
log.Println("cannot read an OGG file", nxt, ":", err)
|
||||||
|
http.Error(w, "cannot read an OGG file", http.StatusInternalServerError)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
song := radio.Song_{
|
song := radio.Song_{
|
||||||
|
Loading…
Reference in New Issue
Block a user