fix(#263): log parse error in getConnectionProfiles (#332)

Adds a debug log to AuthManager.getConnectionProfiles when JSON parsing
fails, instead of silently swallowing the exception and returning an
empty list. This helps diagnose corrupted or malicious connection
profile data without affecting production stability.

Closes #263
This commit is contained in:
M57 authored and GitHub committed 2026-06-23 11:44:57 +03:00
1 parent a27512cee4
commit 557e438dc7
1 file changed
+3
@@ -103,6 +103,9 @@ object AuthManager {
>() {}.type
gson.fromJson(json, type) ?: emptyList()
} catch (e: Exception) {
if (com.m57.hermescontrol.BuildConfig.DEBUG) {
android.util.Log.w("AuthManager", "Failed to parse connection profiles", e)
}
emptyList()
}
}