This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch cybershuttle-staging
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/cybershuttle-staging by this
push:
new 8797fb309b Minor logging improvements
8797fb309b is described below
commit 8797fb309b70e3f87967f9359b8352797cea031a
Author: DImuthuUpe <[email protected]>
AuthorDate: Fri Apr 11 01:11:11 2025 -0400
Minor logging improvements
---
.../apache/airavata/research/service/handlers/SessionHandler.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/handlers/SessionHandler.java
b/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/handlers/SessionHandler.java
index c475d2fe1b..23070b9966 100644
---
a/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/handlers/SessionHandler.java
+++
b/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/handlers/SessionHandler.java
@@ -76,14 +76,15 @@ public class SessionHandler {
String userId = UserContext.userId();
if (!session.getUserId().equals(userId)) {
- throw new RuntimeException("User is not authorized to update
session");
+ LOGGER.error("User " + userId + " is not authorized to update
session " + session.getId());
+ throw new RuntimeException("User " + userId + " is not authorized
to update session " + session.getId());
}
if (status == SessionStatusEnum.TERMINATED) {
try {
researchHubHandler.stopSession(sessionId);
} catch(Exception e) {
- LOGGER.warn("Unable to stop session");
+ LOGGER.error("Unable to stop session {} for user {}",
sessionId, userId, e);
}
}
@@ -100,13 +101,14 @@ public class SessionHandler {
public boolean deleteSession(String sessionId) {
Session session = findSession(sessionId);
if (!session.getUserId().equals(UserContext.userId())) {
+ LOGGER.error("Invalid session id {} for user {}", sessionId,
session.getUserId());
throw new RuntimeException("Invalid session ID");
}
try {
researchHubHandler.deleteSession(sessionId);
} catch(Exception e) {
- LOGGER.warn("Unable to delete session, user already deleted it");
+ LOGGER.error("Unable to delete session, user already deleted it",
e);
}
sessionRepository.delete(session);