fix: CloudService silent error → logging, Status zeigt Token-Fehler an

This commit is contained in:
Dustin
2026-08-01 18:15:04 +02:00
parent a7dbf5e9e1
commit ac543eb84b
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -89,8 +89,8 @@ class _CloudScreenState extends State<CloudScreen> {
if (!mounted) return; if (!mounted) return;
setState(() { setState(() {
_serverCount = st?['total'] ?? 0; _serverCount = st?['total'] ?? 0;
_status = st != null ? 'Verbunden' : 'Keine Verbindung';
_statusOk = st != null; _statusOk = st != null;
_status = st != null ? 'Verbunden' : 'Keine Verbindung (Token?)';
}); });
} }
+4 -1
View File
@@ -98,7 +98,10 @@ class CloudService {
.get(Uri.parse('$_base$path'), headers: _authHeader) .get(Uri.parse('$_base$path'), headers: _authHeader)
.timeout(const Duration(seconds: 10)); .timeout(const Duration(seconds: 10));
if (r.statusCode == 200) return jsonDecode(r.body); if (r.statusCode == 200) return jsonDecode(r.body);
} catch (_) {} MeloLogger().fehler('cloud_get', '${r.statusCode} $path');
} catch (e) {
MeloLogger().fehler('cloud_get_error', '$path: $e');
}
return null; return null;
} }