Skip to content

Commit d8d1a6e

Browse files
authored
Merge pull request #2109 from digma-ai/bug/fix-login-message
Fixed error message for login
2 parents a00a453 + 4c29fb5 commit d8d1a6e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ide-common/src/main/java/org/digma/intellij/plugin/analytics/AnalyticsService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,6 @@ public InsightsStatsResult getInsightsStats(String spanCodeObjectId) throws Anal
495495
var env = getCurrentEnvironmentId();
496496
var envId = getCurrentEnvironmentId();
497497
var params = new HashMap<String, Object>();
498-
params.put("Environment", env);
499498
params.put("Environment", envId);
500499

501500
if (spanCodeObjectId != null) {

ide-common/src/main/kotlin/org/digma/intellij/plugin/auth/AuthManager.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,15 @@ class AuthManager {
360360
}
361361
Log.log(logger::trace, "login success for url={}, user:{}, created account {}", analyticsProvider.apiUrl, userName, digmaAccount)
362362

363-
reportPosthogEvent("login success", mapOf("user" to SILENT_LOGIN_USER))
363+
reportPosthogEvent("login success", mapOf("user" to userName))
364364

365365
LoginResult(true, loginResponse.userId, null)
366366

367367
} catch (e: Throwable) {
368+
if (e is AuthenticationException && analyticsProvider.about.isCentralize == true) {
369+
return LoginResult(false, null, e.detailedMessage)
370+
}
371+
368372
Log.debugWithException(logger, e, "login failed {}", e)
369373
ErrorReporter.getInstance().reportInternalFatalError("AuthManager.login", e)
370374
val errorMessage = ExceptionUtils.getNonEmptyMessage(e)

0 commit comments

Comments
 (0)