Merge pull request 'Improve error message for malformed RPC secret key' (#846) from improve-secret-error-message into main
All checks were successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/cron/debug Pipeline was successful
ci/woodpecker/cron/release/1 Pipeline was successful
ci/woodpecker/cron/release/2 Pipeline was successful
ci/woodpecker/cron/release/3 Pipeline was successful
ci/woodpecker/cron/release/4 Pipeline was successful
ci/woodpecker/cron/publish Pipeline was successful

Reviewed-on: #846
Reviewed-by: Quentin <quentin@dufour.io>
This commit is contained in:
maximilien 2024-08-09 06:47:11 +00:00
commit 3a87bd1370

View file

@ -141,7 +141,7 @@ impl Garage {
)?) )?)
.ok() .ok()
.and_then(|x| NetworkKey::from_slice(&x)) .and_then(|x| NetworkKey::from_slice(&x))
.ok_or_message("Invalid RPC secret key")?; .ok_or_message("Invalid RPC secret key: expected 32 bits of entropy, please check the documentation for requirements")?;
let (replication_factor, consistency_mode) = parse_replication_mode(&config)?; let (replication_factor, consistency_mode) = parse_replication_mode(&config)?;