Skip to content
Snippets Groups Projects
Verified Commit c197d506 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

[NSS] Log JSON error

parent 5ac09433
No related branches found
No related tags found
No related merge requests found
...@@ -95,8 +95,8 @@ impl PasswdHooks for OidcPasswd { ...@@ -95,8 +95,8 @@ impl PasswdHooks for OidcPasswd {
ctc = ct.clone(); ctc = ct.clone();
&ctc &ctc
}, },
Err(_) => { Err(e) => {
error!("Failed to get access token with client credentials"); error!("Failed to get access token with client credentials: {}", e);
return Response::Unavail; return Response::Unavail;
} }
} }
...@@ -105,8 +105,8 @@ impl PasswdHooks for OidcPasswd { ...@@ -105,8 +105,8 @@ impl PasswdHooks for OidcPasswd {
let data: Vec<PasswdHelper> = match get_data_jq(&conf, "nss", "passwd.list", "".to_string(), &token, true) { let data: Vec<PasswdHelper> = match get_data_jq(&conf, "nss", "passwd.list", "".to_string(), &token, true) {
Ok(d) => d, Ok(d) => d,
Err(_) => { Err(e) => {
error!("Could not load JSON data for passwd"); error!("Could not load JSON data for passwd: {}", e);
return Response::Unavail; return Response::Unavail;
} }
}; };
...@@ -129,8 +129,8 @@ impl PasswdHooks for OidcPasswd { ...@@ -129,8 +129,8 @@ impl PasswdHooks for OidcPasswd {
ctc = ct.clone(); ctc = ct.clone();
&ctc &ctc
}, },
Err(_) => { Err(e) => {
error!("Failed to get access token with client credentials"); error!("Failed to get access token with client credentials: {}", e);
return Response::Unavail; return Response::Unavail;
} }
} }
...@@ -139,8 +139,8 @@ impl PasswdHooks for OidcPasswd { ...@@ -139,8 +139,8 @@ impl PasswdHooks for OidcPasswd {
let data: Passwd = match get_data_jq(&conf, "nss", "passwd.by_uid", uid.to_string(), &token, false).map(|PasswdHelper(p)| p) { let data: Passwd = match get_data_jq(&conf, "nss", "passwd.by_uid", uid.to_string(), &token, false).map(|PasswdHelper(p)| p) {
Ok(d) => d, Ok(d) => d,
Err(_) => { Err(e) => {
error!("Could not load JSON data for passwd"); error!("Could not load JSON data for passwd: {}", e);
return Response::NotFound; return Response::NotFound;
} }
}; };
...@@ -163,8 +163,8 @@ impl PasswdHooks for OidcPasswd { ...@@ -163,8 +163,8 @@ impl PasswdHooks for OidcPasswd {
ctc = ct.clone(); ctc = ct.clone();
&ctc &ctc
}, },
Err(_) => { Err(e) => {
error!("Failed to get access token with client credentials"); error!("Failed to get access token with client credentials: {}", e);
return Response::Unavail; return Response::Unavail;
} }
} }
...@@ -173,8 +173,8 @@ impl PasswdHooks for OidcPasswd { ...@@ -173,8 +173,8 @@ impl PasswdHooks for OidcPasswd {
let data: Passwd = match get_data_jq(&conf, "nss", "passwd.by_name", name, &token, false).map(|PasswdHelper(p)| p) { let data: Passwd = match get_data_jq(&conf, "nss", "passwd.by_name", name, &token, false).map(|PasswdHelper(p)| p) {
Ok(d) => d, Ok(d) => d,
Err(_) => { Err(e) => {
error!("Could not load JSON data for passwd"); error!("Could not load JSON data for passwd: {}", e);
return Response::NotFound; return Response::NotFound;
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment