From 7902849dc021610b0ec16d1130b9515efd1f64b1 Mon Sep 17 00:00:00 2001 From: Keuin Date: Wed, 14 Sep 2022 03:02:51 +0800 Subject: Refactor: proper error handling. --- bilibili/streaming.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bilibili/streaming.go') diff --git a/bilibili/streaming.go b/bilibili/streaming.go index c89126d..ea9207c 100644 --- a/bilibili/streaming.go +++ b/bilibili/streaming.go @@ -42,7 +42,7 @@ func (b Bilibili) CopyLiveStream( // 404 when not streaming if resp.StatusCode == http.StatusNotFound { - return ErrRoomIsClosed + return fmt.Errorf("live is not started or the room does not exist") } err = validateHttpStatus(resp) -- cgit v1.2.3