Catch unhandled io errors in subsonic (#75)

This commit is contained in:
Simon J
2021-11-08 17:20:50 +11:00
committed by GitHub
parent 9851ee46b3
commit c804627a0a
2 changed files with 32 additions and 1 deletions

View File

@@ -400,6 +400,8 @@ export class Subsonic implements MusicService {
"User-Agent": USER_AGENT,
},
...config,
}).catch(e => {
throw `Subsonic failed with: ${e}`;
})
.then((response) => {
if (response.status != 200 && response.status != 206) {