### Feature and motivation

Several valid [w3c errors](https://w3c.github.io/webdriver/#ref-for-dfn-error-code-13) are missing from [ErrorCodec](https://github.com/SeleniumHQ/selenium/blob/trunk/java/src/org/openqa/selenium/remote/ErrorCodec.java) class:

* `detached shadow root` 
* `no such shadow root`
* `insecure certificate`

### Usage example

Right now accessing a page with Insecure Certificate in Firefox returns a generic `WebDriverException`
public WebDriverException decode(Map<String, Object> response) {
    if (!(response.get("value") instanceof Map)) {
      throw new IllegalArgumentException("Unable to find mapping for " + response.toString());
    }
    Map<?, ?> value = (Map<?, ?>) response.get("value");
    if (!(value.get("error") instanceof String)) {
      throw new IllegalArgumentException("Unable to find mapping for " + response.toString());
    }
    String error = (String) value.get("error");
    String message = value.get("message") instanceof String ? (String) value.get("message") : null;
    W3CError w3CError =
        ERRORS.stream()
            .filter(err -> error.equals(err.w3cErrorString))
            .findFirst()
            .orElse(DEFAULT_ERROR);
    try {
      Constructor<? extends WebDriverException> constructor =
          w3CError.exception.getConstructor(String.class);
      return constructor.newInstance(message);
    } catch (ReflectiveOperationException e) {
      throw new WebDriverException(message, e);
    }
  }
  private W3CError fromThrowable(Throwable throwable) {
    return ERRORS.stream()
        .filter(err -> throwable.getClass().isAssignableFrom(err.exception))
        .findFirst()
        .orElse(DEFAULT_ERROR);
  }
  private static class W3CError {