fix: 完善 ScoreSaber 歌曲哈希查询的错误处理
This commit is contained in:
parent
78afc9005f
commit
48ed4e8569
@ -411,6 +411,9 @@ func GetSongIdsByHash(hashs []string) (hashToSongId map[string]string, err error
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode != 200 {
|
||||
return nil, fmt.Errorf("获取歌曲ID失败,状态码:%d,url:%s", resp.StatusCode, queryUrl)
|
||||
}
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
x
Reference in New Issue
Block a user