code: public static TransportErrorCode fromWebSocket(int code) {
          TransportErrorCode builtIn = WEBSOCKET_ERROR_CODE_MAP.get(code);
          if (builtIn == null) {
              if (code < 0 || code > 65535) {
                  throw new IllegalArgumentException("Invalid WebSocket status code: " + code);
              } else if (code >= 4400 && code <= 4599) {
                  return new TransportErrorCode(code - 4000, code, "Unknown error code");
              } else {
                  return new TransportErrorCode(404, code, "Unknown error code");
              }
          } else {
              return builtIn;
          }
      }
docs: Get a transport error code from the given WebSocket close code.
  
  @param code The WebSocket close code, must be between 0 and 65535 inclusive.
  @return The transport error code.
  @throws IllegalArgumentException if the code is not an unsigned 2 byte integer.