audio playback error logging

subsonic error logging
source save error logging
This commit is contained in:
austinried
2023-05-14 10:40:23 +09:00
parent e410dcb2eb
commit 121af2bca3
4 changed files with 38 additions and 29 deletions

View File

@@ -6,6 +6,7 @@ import 'package:crypto/crypto.dart';
import 'package:http/http.dart';
import 'package:xml/xml.dart';
import '../../log.dart';
import '../../models/settings.dart';
import 'xml.dart';
@@ -89,7 +90,9 @@ class SubsonicClient {
final subsonicResponse =
SubsonicResponse(XmlDocument.parse(utf8.decode(res.bodyBytes)));
if (subsonicResponse.status == Status.failed) {
throw SubsonicException(subsonicResponse.xml);
final error = SubsonicException(subsonicResponse.xml);
log.severe('Subsonic error', error);
throw error;
}
return subsonicResponse;