{"record":{"id":"5085699329463bb3","repo":"eclipse-vertx/vert.x","slug":"not-connected","errorCode":null,"errorMessage":"Not connected","messagePattern":"Not connected","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/http/impl/websocket/ClientWebSocketImpl.java","lineNumber":332,"sourceCode":"  @Override\n  public List<Certificate> peerCertificates() throws SSLPeerUnverifiedException {\n    return delegate().peerCertificates();\n  }\n\n  @Override\n  public Future<Void> write(Buffer data) {\n    return delegate().write(data);\n  }\n\n  @Override\n  public boolean writeQueueFull() {\n    return delegate().writeQueueFull();\n  }\n\n  private WebSocketInternal delegate() {\n    WebSocketInternal w = ws;\n    if (w == null) {\n      throw new IllegalStateException(\"Not connected\");\n    }\n    return w;\n  }\n}\n","sourceCodeStart":314,"sourceCodeEnd":337,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/http/impl/websocket/ClientWebSocketImpl.java#L314-L337","documentation":"Lifecycle guard in ClientWebSocketImpl.delegate: the client WebSocket's internal connection (ws) is null, meaning the socket is not connected yet (or has been closed). Any delegate-requiring operation (write, pause, fetch, handlers, ...) invoked before the connection is established fails with this generic 'Not connected' sentinel.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/http/impl/websocket/ClientWebSocketImpl.java:332 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait for the connect future to complete before using the WebSocket","Check the socket state or track connection lifecycle before invoking operations"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}