mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 23:25:26 +00:00
Replaced exception throw with Promise Rejection
This commit is contained in:
8
index.js
8
index.js
@@ -465,7 +465,13 @@ class Pass {
|
|||||||
contents.forEach(file => {
|
contents.forEach(file => {
|
||||||
let pem = this.__parsePEM(file, options.certificates.signerKey.passphrase);
|
let pem = this.__parsePEM(file, options.certificates.signerKey.passphrase);
|
||||||
if (!pem.key || !pem.value) {
|
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;
|
this.Certificates[pem.key] = pem.value;
|
||||||
|
|||||||
Reference in New Issue
Block a user