diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js
index f9b10006..97f86c2a 100644
--- a/dist/cleanup/index.js
+++ b/dist/cleanup/index.js
@@ -6196,7 +6196,7 @@ function removePrivateKeyFromKeychain() {
                 yield gpg.deleteKey(keyFingerprint);
             }
             catch (error) {
-                core.setFailed('Failed to remove private key');
+                core.setFailed(`Failed to remove private key due to: ${error.message}`);
             }
         }
     });
diff --git a/src/cleanup-java.ts b/src/cleanup-java.ts
index a30de4a7..a890c4b6 100644
--- a/src/cleanup-java.ts
+++ b/src/cleanup-java.ts
@@ -11,7 +11,7 @@ async function removePrivateKeyFromKeychain() {
       const keyFingerprint = core.getState(constants.STATE_GPG_PRIVATE_KEY_FINGERPRINT);
       await gpg.deleteKey(keyFingerprint);
     } catch (error) {
-      core.setFailed('Failed to remove private key');
+      core.setFailed(`Failed to remove private key due to: ${error.message}`);
     }
   }
 }