fix(logging): log errors instead of silently discarding with .ok()
Replace silent .ok() calls with explicit match + warn! logging in encode_quick_notes and passkey deserialization for exclude lists.
This commit is contained in:
parent
3594ad40ea
commit
b5fdf8b27c
1 changed files with 7 additions and 1 deletions
|
|
@ -68,7 +68,13 @@ impl SqlBrewRepository {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
let labels: Vec<&str> = notes.iter().map(|n| n.label()).collect();
|
let labels: Vec<&str> = notes.iter().map(|n| n.label()).collect();
|
||||||
serde_json::to_string(&labels).ok()
|
match serde_json::to_string(&labels) {
|
||||||
|
Ok(json) => Some(json),
|
||||||
|
Err(err) => {
|
||||||
|
tracing::warn!(error = %err, "failed to encode quick notes as JSON");
|
||||||
|
None
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue