Skip to content

Commit 6a36eba

Browse files
committed
error change
1 parent c6754c3 commit 6a36eba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/opentok/api/OpenTokSDK.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public OpenTokSDK(int api_key, String api_secret) {
4848
public String generate_token(String session_id, String role, Long expire_time, String connection_data) throws OpenTokException {
4949

5050
if(session_id == null || session_id == "") {
51-
throw new OpenTokException("SessionId cannot be null or empty.");
51+
throw new OpenTokException("Null or empty session ID are not valid");
5252
}
5353
String decodedSessionId = "";
5454
try {
@@ -62,10 +62,10 @@ public String generate_token(String session_id, String role, Long expire_time, S
6262
}
6363
}
6464
if(!decodedSessionId.split("~")[1].equals(String.valueOf(api_key))) {
65-
throw new OpenTokException("SessionId does not belong to the same partnerId");
65+
throw new OpenTokException("An invalid session ID was passed");
6666
}
6767
} catch (Exception e) {
68-
throw new OpenTokException("SessionId cannot be invalid.");
68+
throw new OpenTokException("An invalid session ID was passed");
6969
}
7070

7171

0 commit comments

Comments
 (0)