mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore(mobile): more logs (#9081)
This commit is contained in:
parent
87de809e3d
commit
b4f6184aa6
1 changed files with 8 additions and 0 deletions
|
|
@ -102,6 +102,7 @@ class ApiService {
|
||||||
.get(Uri.parse("$serverUrl/server-info/ping"))
|
.get(Uri.parse("$serverUrl/server-info/ping"))
|
||||||
.timeout(const Duration(seconds: 5));
|
.timeout(const Duration(seconds: 5));
|
||||||
|
|
||||||
|
_log.info("Pinging server with response code ${response.statusCode}");
|
||||||
if (response.statusCode != 200) {
|
if (response.statusCode != 200) {
|
||||||
_log.severe(
|
_log.severe(
|
||||||
"Server Gateway Error: ${response.body} - Cannot communicate to the server",
|
"Server Gateway Error: ${response.body} - Cannot communicate to the server",
|
||||||
|
|
@ -112,6 +113,13 @@ class ApiService {
|
||||||
return false;
|
return false;
|
||||||
} on SocketException catch (_) {
|
} on SocketException catch (_) {
|
||||||
return false;
|
return false;
|
||||||
|
} catch (error, stackTrace) {
|
||||||
|
_log.severe(
|
||||||
|
"Error while checking server availability",
|
||||||
|
error,
|
||||||
|
stackTrace,
|
||||||
|
);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue