Skip to content

Commit 48ec4ba

Browse files
committed
Propagate ohttp keys config error
1 parent 52d19ae commit 48ec4ba

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

payjoin-cli/src/app/config.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,13 @@ impl AppConfig {
102102
.set_override_option(
103103
"ohttp_keys",
104104
matches.get_one::<String>("ohttp_keys").and_then(|s| {
105-
std::fs::read(s)
106-
.map_err(|e| {
107-
log::error!("Failed to read ohttp_keys file: {}", e);
108-
ConfigError::Message(format!(
109-
"Failed to read ohttp_keys file: {}",
110-
e
111-
))
112-
})
113-
.ok()
105+
Some(std::fs::read(s).map_err(|e| {
106+
log::error!("Failed to read ohttp_keys file: {}", e);
107+
ConfigError::Message(format!(
108+
"Failed to read ohttp_keys file: {}",
109+
e
110+
))
111+
})?)
114112
}),
115113
)?
116114
};

0 commit comments

Comments
 (0)