[grid] Retrying session creation for all cases
import static org.openqa.selenium.remote.RemoteTags.CAPABILITIES_EVENT;
import static org.openqa.selenium.remote.RemoteTags.SESSION_ID;
import static org.openqa.selenium.remote.RemoteTags.SESSION_ID_EVENT;
-import static org.openqa.selenium.remote.http.Contents.bytes;
import static org.openqa.selenium.remote.http.Contents.reader;
import static org.openqa.selenium.remote.http.Route.delete;
import static org.openqa.selenium.remote.http.Route.get;
@@ -248,8 +247,8 @@ protected Distributor(
attributeMap.put(AttributeKey.EXCEPTION_MESSAGE.getKey(),
EventAttribute.setValue("Unable to create session: " + e.getMessage()));
span.addEvent(AttributeKey.EXCEPTION_EVENT.getKey(), attributeMap);
-
- return Either.left(e);
+ SessionNotCreatedException exception = new RetrySessionRequestException(e.getMessage());
+ return Either.left(exception);
} catch (IOException e) {
span.setAttribute("error", true);
span.setStatus(Status.UNKNOWN);
