Skip to content

Commit 4fb9d50

Browse files
committed
Add invalid host to error message
1 parent 92f09b8 commit 4fb9d50

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

crates/stackable-operator/src/commons/networking.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ impl FromStr for Host {
7979
return Ok(Host::Hostname(hostname));
8080
};
8181

82-
Err(validation::Error::InvalidHost {})
82+
Err(validation::Error::InvalidHost {
83+
host: value.to_owned(),
84+
})
8385
}
8486
}
8587

crates/stackable-operator/src/validation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ pub enum Error {
9292
TooLong { length: usize, max_length: usize },
9393

9494
#[snafu(display(
95-
"input is not a valid host, which needs to be either a hostname or IP address"
95+
"The input '{host}' is not a valid host, which needs to be either a hostname or IP address"
9696
))]
97-
InvalidHost {},
97+
InvalidHost { host: String },
9898
}
9999

100100
#[derive(Debug)]

0 commit comments

Comments
 (0)