Skip to content

Commit

Permalink
Merge pull request #8208 from camptocamp/GSGMF-1752-login-error-catching
Browse files Browse the repository at this point in the history
Add missing reject in deferrableOnSuccessfulLogin
  • Loading branch information
arnaud-morvan committed Mar 4, 2022
2 parents eaef457 + ee677e5 commit 1054e54
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contribs/gmf/src/authentication/Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ export class AuthenticationService extends olEventsEventTarget {
* @param {angular.IPromise<AuthenticationLoginResponsePromise>} promise Ajax promise.
*/
deferrableOnSuccessfulLogin(defer, promise) {
promise.then((resp) => this.onSuccessfulLogin(resp)).then((resp) => defer.resolve(resp));
promise
.then((resp) => this.onSuccessfulLogin(resp))
.then((resp) => defer.resolve(resp))
.catch((resp) => defer.reject(resp));
}

/**
Expand Down

0 comments on commit 1054e54

Please sign in to comment.