From a8d60bca607e4e7321732815fc81e593bfa2f699 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 11 Nov 2022 22:45:09 +0100 Subject: [PATCH] Improved logging --- .../main/java/eu/faircode/email/ServiceAuthenticator.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceAuthenticator.java b/app/src/main/java/eu/faircode/email/ServiceAuthenticator.java index dd66733863..b6455523a5 100644 --- a/app/src/main/java/eu/faircode/email/ServiceAuthenticator.java +++ b/app/src/main/java/eu/faircode/email/ServiceAuthenticator.java @@ -212,9 +212,10 @@ public class ServiceAuthenticator extends Authenticator { Log.i("OAuth refreshed user=" + id + ":" + user); if (holder.error != null) { - Throwable cause = holder.error.getCause(); - String msg = (cause == null ? null : cause.getMessage()); - Log.e(new Throwable("Token refresh failed id=" + id + " error=" + msg, holder.error)); + Log.e(new Throwable("Token refresh failed" + + " id=" + id + + " error=" + holder.error.getMessage(), + holder.error)); throw holder.error; } } catch (Exception ex) {