{"record":{"id":"00f24b1f94a77667","repo":"redis/jedis","slug":"unknown-endpoint-type","errorCode":null,"errorMessage":"Unknown endpoint type: ","messagePattern":"Unknown endpoint type: ","errorType":"exception","errorClass":"JedisException","httpStatus":null,"severity":"error","filePath":"src/main/java/redis/clients/jedis/MaintenanceAwareVisitor.java","lineNumber":145,"sourceCode":"    // TLS as declared by the client config: enabled when either ssl(true) or sslOptions is set,\n    // mirroring DefaultJedisSocketFactory#createSocket.\n    JedisClientConfig clientConfig = builder.getClientConfig();\n    boolean sslEnabled = clientConfig.isSsl() || clientConfig.getSslOptions() != null;\n    MaintenanceNotificationsConfig.EndpointType endpointType = config.getEndpointTypeResolver()\n        .getEndpointType(connection.getRemoteSocketAddress(), sslEnabled);\n    switch (endpointType) {\n      case INTERNAL_IP:\n        return \"internal-ip\";\n      case INTERNAL_FQDN:\n        return \"internal-fqdn\";\n      case EXTERNAL_IP:\n        return \"external-ip\";\n      case EXTERNAL_FQDN:\n        return \"external-fqdn\";\n      case NONE:\n        return \"none\";\n      default:\n        throw new JedisException(\"Unknown endpoint type: \" + endpointType);\n    }\n  }\n\n  /** Pool-wide MOVING rebind overlay: active while the controller reports a valid rebind window. */\n  private static final class RebindTimeoutSource extends ChainedTimeoutSource {\n\n    private final MaintenanceEventController controller;\n\n    RebindTimeoutSource(MaintenanceEventController controller) {\n      super(null, controller);\n      this.controller = controller;\n    }\n\n    @Override\n    protected TimeoutInfo getOwnInfo() {\n      return controller.getTimeoutSupplier().get();\n    }\n  }","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/redis/jedis/blob/6dac31d4c224fb3257c216f3985340c6f500cdcb/src/main/java/redis/clients/jedis/MaintenanceAwareVisitor.java#L127-L163","documentation":"resolveEndpointType maps a JedisEndpointType enum to its wire-format string (e.g. external-ip, external-fqdn, none). Hitting the default branch means an endpoint type value was encountered that this Jedis version does not know how to serialize, so it throws JedisException.","triggerScenarios":"visitAfterHandshake resolving the endpoint type of a connection whose Endpoint carries an unrecognized/unknown enum constant — typically an enum value from a newer server or client version being processed by an older code path, or a custom Endpoint implementation returning an unexpected type.","commonSituations":"Version skew between client and server extension enums; a newly added endpoint type not yet handled by the installed Jedis version; hand-constructed endpoints with null or exotic type values.","solutions":["Upgrade jedis to a version whose resolveEndpointType handles the endpoint type in use","Check which endpoint type is being configured and use a supported one (EXTERNAL_IP, EXTERNAL_FQDN, NONE)","If a new type was added upstream, add a case for it in the switch"],"exampleFix":"// before\nEndpoint endpoint = Endpoint.builder().type(SomeNewType.RDS).build(); // unknown to this jedis version\n// after\nEndpoint endpoint = Endpoint.builder().type(JedisEndpointType.EXTERNAL_FQDN).build(); // supported type","handlingStrategy":"type-guard","validationCode":"// Ensure the configured endpoint type is one the client maps\nSet<String> supported = Set.of(\"external-ip\", \"external-fqdn\", \"none\");\nif (!supported.contains(endpointTypeString)) {\n  throw new IllegalArgumentException(\"Unsupported endpoint type: \" + endpointTypeString);\n}","typeGuard":"boolean isKnownEndpointType(JedisEndpointType t) {\n  return t == JedisEndpointType.EXTERNAL_IP\n      || t == JedisEndpointType.EXTERNAL_FQDN\n      || t == JedisEndpointType.NONE;\n}","tryCatchPattern":null,"preventionTips":["Keep client and server/managed-Redis SDK versions aligned so endpoint type enums match","Only use enum constants documented for your jedis version","Add a default-mapping case when introducing new endpoint types upstream"],"tags":["redis","endpoint","enum","unmapped-value"],"backgroundTag":"invalid-enum-value","analyzedSha":"6dac31d4c224fb3257c216f3985340c6f500cdcb","analyzedAt":"2026-09-08T04:55:01.204Z","contentChangedAt":"2026-09-08T04:55:01.204Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}