fix(plex): tolerate transient resource failures

This commit is contained in:
edde746
2026-05-16 22:54:53 +02:00
parent 3798a0c332
commit cfd4aa307d
7 changed files with 342 additions and 7 deletions
@@ -89,6 +89,15 @@ void main() {
final e = MediaServerHttpException(type: MediaServerHttpErrorType.cancelled, message: 'halt');
expect(e.toString(), 'MediaServerHttpException(cancelled: halt)');
});
test('toString includes host and path without query parameters', () {
final e = MediaServerHttpException(
type: MediaServerHttpErrorType.connectionError,
message: 'dns failed',
requestUri: Uri.parse('https://clients.plex.tv/api/v2/resources?X-Plex-Token=secret'),
);
expect(e.toString(), 'MediaServerHttpException(connectionError: dns failed: clients.plex.tv/api/v2/resources)');
});
});
group('MediaServerHttpException.isTransient', () {