Skip to content

Commit f44ee99

Browse files
authored
[backend] Improv tanium token expiration logs
1 parent 3c31084 commit f44ee99

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

openaev-api/src/main/java/io/openaev/executors/tanium/client/TaniumExecutorClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ private String post(@NotNull final Map<String, Object> body) throws IOException
174174
}
175175

176176
return result;
177+
} else if (status == 401) {
178+
throw new TokenExpiredException(
179+
"Tanium token expired or invalid : " + +status + "\nBody: " + result);
177180
} else {
178181
throw new ClientProtocolException(
179182
"Unexpected response status: " + status + "\nBody: " + result);
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package io.openaev.executors.tanium.client;
2+
3+
public class TokenExpiredException extends RuntimeException {
4+
5+
public TokenExpiredException(String message) {
6+
super(message);
7+
}
8+
}

0 commit comments

Comments
 (0)