diff --git a/index.js b/index.js index fab9d6e..b0ada0d 100644 --- a/index.js +++ b/index.js @@ -465,7 +465,13 @@ class Pass { contents.forEach(file => { let pem = this.__parsePEM(file, options.certificates.signerKey.passphrase); if (!pem.key || !pem.value) { - throw new Error("Invalid certificates got loaded. Please provide WWDR certificates and developer signer certificate and key (with passphrase)."); + return reject({ + status: false, + error: { + message: "Invalid certificates got loaded. Please provide WWDR certificates and developer signer certificate and key (with passphrase).", + ecode: 418 + } + }) } this.Certificates[pem.key] = pem.value;