Skip to content

Commit

Permalink
chore: Add more error context
Browse files Browse the repository at this point in the history
  • Loading branch information
tlater-famedly committed Dec 5, 2024
1 parent 7107eef commit 1e099d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sources/ldap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ impl LdapSource {
let enabled = if disable_bitmask != 0 {
disable_bitmask
& match status {
StringOrBytes::String(status) => status.parse::<i32>()?,
StringOrBytes::String(status) => {
status.parse::<i32>().context("failed to parse status attribute")?
}
StringOrBytes::Bytes(status) => {
i32::from_be_bytes(status.try_into().map_err(|err: Vec<u8>| {
let err_string = String::from_utf8_lossy(&err).to_string();
Expand Down

0 comments on commit 1e099d5

Please sign in to comment.