From 9b4b19f3b3017cdf345b2adf007b7af084f9a5e6 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 3 May 2017 15:18:28 -0400 Subject: [PATCH] Ensure we reject promises on failure --- src/credentialstore/credentialstore.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/credentialstore/credentialstore.ts b/src/credentialstore/credentialstore.ts index 2a26b9dff..cf004b897 100644 --- a/src/credentialstore/credentialstore.ts +++ b/src/credentialstore/credentialstore.ts @@ -85,11 +85,15 @@ export class CredentialStore implements ICredentialStore { this.RemoveCredential(service).then(() => { this._credentialStore.SetCredential(service, username, password).then(() => { deferred.resolve(undefined); + }).catch((reason) => { + deferred.reject(reason); }); }); } else { this._credentialStore.SetCredential(service, username, password).then(() => { deferred.resolve(undefined); + }).catch((reason) => { + deferred.reject(reason); }); } }).catch((reason) => {