diff --git a/src/nss.rs b/src/nss.rs
index 9588e033f6745a656f316c1495aa0ccee7682f2b..986cf0f51669d07e581f8c9f4b6f7c1a9ba1161a 100644
--- a/src/nss.rs
+++ b/src/nss.rs
@@ -95,8 +95,8 @@ impl PasswdHooks for OidcPasswd {
                         ctc = ct.clone();
                         &ctc
                     },
-                    Err(_) => {
-                        error!("Failed to get access token with client credentials");
+                    Err(e) => {
+                        error!("Failed to get access token with client credentials: {}", e);
                         return Response::Unavail;
                     }
                 }
@@ -105,8 +105,8 @@ impl PasswdHooks for OidcPasswd {
 
         let data: Vec<PasswdHelper> = match get_data_jq(&conf, "nss", "passwd.list", "".to_string(), &token, true) {
             Ok(d) => d,
-            Err(_) => {
-                error!("Could not load JSON data for passwd");
+            Err(e) => {
+                error!("Could not load JSON data for passwd: {}", e);
                 return Response::Unavail;
             }
         };
@@ -129,8 +129,8 @@ impl PasswdHooks for OidcPasswd {
                         ctc = ct.clone();
                         &ctc
                     },
-                    Err(_) => {
-                        error!("Failed to get access token with client credentials");
+                    Err(e) => {
+                        error!("Failed to get access token with client credentials: {}", e);
                         return Response::Unavail;
                     }
                 }
@@ -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) {
             Ok(d) => d,
-            Err(_) => {
-                error!("Could not load JSON data for passwd");
+            Err(e) => {
+                error!("Could not load JSON data for passwd: {}", e);
                 return Response::NotFound;
             }
         };
@@ -163,8 +163,8 @@ impl PasswdHooks for OidcPasswd {
                         ctc = ct.clone();
                         &ctc
                     },
-                    Err(_) => {
-                        error!("Failed to get access token with client credentials");
+                    Err(e) => {
+                        error!("Failed to get access token with client credentials: {}", e);
                         return Response::Unavail;
                     }
                 }
@@ -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) {
             Ok(d) => d,
-            Err(_) => {
-                error!("Could not load JSON data for passwd");
+            Err(e) => {
+                error!("Could not load JSON data for passwd: {}", e);
                 return Response::NotFound;
             }
         };