From a0b34e8b18634d634d8c3caf995c130203f40bc7 Mon Sep 17 00:00:00 2001 From: yufansong Date: Mon, 18 Sep 2023 15:12:45 -0700 Subject: [PATCH] add plain --- src/connector/src/common.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/connector/src/common.rs b/src/connector/src/common.rs index c2a803b8623f1..4e2142fda0adb 100644 --- a/src/connector/src/common.rs +++ b/src/connector/src/common.rs @@ -402,7 +402,12 @@ impl NatsCommon { )); } } - _ => {} + Some("plain") => {} + _ => { + return Err(anyhow_error!( + "nats connect mode only accept user_and_password/credential/plain" + )); + } }; let servers = self.server_url.split(',').collect::>();