TF-4136 refactor(logging): replace logError with logWarning for non-critical cases

This commit is contained in:
dab246
2026-01-02 12:18:38 +07:00
committed by Dat H. Pham
parent 73dcb6067c
commit a23d15a9ca
160 changed files with 382 additions and 360 deletions
@@ -24,7 +24,7 @@ class AuthenticateOidcOnBrowserInteractor {
config.scopes);
yield Right<Failure, Success>(AuthenticateOidcOnBrowserSuccess());
} catch (e) {
logError('AuthenticateOidcOnBrowserInteractor::execute(): $e');
logWarning('AuthenticateOidcOnBrowserInteractor::execute(): $e');
yield Left<Failure, Success>(AuthenticateOidcOnBrowserFailure(e));
}
}
@@ -28,7 +28,7 @@ class GetOIDCConfigurationInteractor {
GetOIDCConfigurationSuccess(configWithLoginHint),
);
} catch (e) {
logError('$runtimeType::execute():oidcResponse = ${oidcResponse.runtimeType} | Exception = $e');
logWarning('$runtimeType::execute():oidcResponse = ${oidcResponse.runtimeType} | Exception = $e');
if (oidcResponse is BaseUrlOidcResponse) {
yield Left<Failure, Success>(GetOIDCConfigurationFromBaseUrlFailure(e));
} else {
@@ -53,14 +53,14 @@ class GetTokenOIDCInteractor {
baseUri,
));
} on PlatformException catch (e) {
logError('GetTokenOIDCInteractor::execute(): PlatformException ${e.message} - ${e.stacktrace}');
logWarning('GetTokenOIDCInteractor::execute(): PlatformException ${e.message} - ${e.stacktrace}');
if (NoSuitableBrowserForOIDCException.verifyException(e)) {
yield Left<Failure, Success>(GetTokenOIDCFailure(NoSuitableBrowserForOIDCException()));
} else {
yield Left<Failure, Success>(GetTokenOIDCFailure(e));
}
} catch (e) {
logError('GetTokenOIDCInteractor::execute(): $e');
logWarning('GetTokenOIDCInteractor::execute(): $e');
yield Left<Failure, Success>(GetTokenOIDCFailure(e));
}
}
@@ -43,7 +43,7 @@ class TryGuessingWebFingerInteractor {
yield Right(TryGuessingWebFingerSuccess(firstNonNullResponse));
}
} catch (e) {
logError('$runtimeType::execute(): Exception = $e');
logWarning('$runtimeType::execute(): Exception = $e');
yield Left(TryGuessingWebFingerFailure(exception: e));
}
}
@@ -45,7 +45,7 @@ class UpdateAccountCacheInteractor {
try {
return session.getQualifiedApiUrl(baseUrl: baseUrl);
} catch (e) {
logError('UpdateAccountCacheInteractor::_getQualifiedApiUrl:Exception = $e');
logWarning('UpdateAccountCacheInteractor::_getQualifiedApiUrl:Exception = $e');
return '';
}
}