Unverified Commit 9d48194d authored by Lanqing Yang's avatar Lanqing Yang Committed by GitHub
Browse files

fix: ensure nats fails fast with jetstream failure (#2590)


Signed-off-by: default avatarlyang24 <lanqingy93@gmail.com>
parent ab9c9509
......@@ -343,6 +343,12 @@ impl ClientOptions {
let js_ctx = jetstream::new(client.clone());
// Validate JetStream is available
js_ctx
.query_account()
.await
.map_err(|e| anyhow::anyhow!("JetStream not available: {e}"))?;
Ok(Client { client, js_ctx })
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment