Skip to content

Commit e6207a6

Browse files
krmahadevanshs96c
authored andcommitted
Attempt to be a little more informative if session is not created
Based on a change in PR #3602, but will always set the value of the error to "Session Not Created".
1 parent ed06eca commit e6207a6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

java/client/src/org/openqa/selenium/remote/ProtocolHandshake.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,7 @@ private Optional<Result> createSession(HttpClient client, InputStream newSession
353353
tempResponse = new Response(null);
354354
tempResponse.setStatus(ErrorCodes.SESSION_NOT_CREATED);
355355
tempResponse.setValue(jsonBlob);
356-
} else if (
357-
ossStatus instanceof Number &&
358-
((Number) ossStatus).intValue() == ErrorCodes.SESSION_NOT_CREATED) {
356+
} else if (ossStatus instanceof Number) {
359357
tempResponse = new Response(null);
360358
tempResponse.setStatus(ErrorCodes.SESSION_NOT_CREATED);
361359
tempResponse.setValue(jsonBlob);

0 commit comments

Comments
 (0)