From cc5e60ed908777265347ba27242af5df92203882 Mon Sep 17 00:00:00 2001 From: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> Date: Thu, 16 Jun 2022 13:13:50 -0600 Subject: [PATCH] fix incorrect error message for deserialization in ValueSpecString (#1547) --- backend/src/config/spec.rs | 2 +- backend/test/config-spec/lnd-correct.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/config/spec.rs b/backend/src/config/spec.rs index 8f61d32d6..22a63e27b 100644 --- a/backend/src/config/spec.rs +++ b/backend/src/config/spec.rs @@ -1213,7 +1213,7 @@ impl<'de> Deserialize<'de> for ValueSpecString { masked = map.next_value()?; } else if &key == "placeholder" { if placeholder.is_some() { - return Err(serde::de::Error::duplicate_field("pattern")); + return Err(serde::de::Error::duplicate_field("placeholder")); } else { placeholder = Some(map.next_value()?); } diff --git a/backend/test/config-spec/lnd-correct.yaml b/backend/test/config-spec/lnd-correct.yaml index bdf87068a..d9acba2e7 100644 --- a/backend/test/config-spec/lnd-correct.yaml +++ b/backend/test/config-spec/lnd-correct.yaml @@ -27,6 +27,7 @@ alias: name: Alias description: The public, human-readable name of your Lightning node nullable: true + placeholder: Enter a value pattern: ".{1,32}" pattern-description: Must be at least 1 character and no more than 32 characters color: