mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-04-23 12:30:32 +03:00
Fix response check NPE
Fix response check doens't take into account that body will be null if response is not successfull. Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
This commit is contained in:
parent
52545bc714
commit
f2ce22ef08
@ -1462,7 +1462,9 @@ public class RESTMusicService implements MusicService
|
||||
return;
|
||||
}
|
||||
|
||||
if (response.body().getStatus() == SubsonicResponse.Status.ERROR &&
|
||||
if (!response.isSuccessful()) {
|
||||
throw new IOException("Server error, code: " + response.code());
|
||||
} else if (response.body().getStatus() == SubsonicResponse.Status.ERROR &&
|
||||
response.body().getError() != null) {
|
||||
throw new IOException("Server error: " + response.body().getError().getCode());
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user