Skip to content

Commit e91975d

Browse files
author
Paul Wheeler
committed
Merge branch 'fail-promise-on-error' into invio-release-5.1401
2 parents 37746ca + 87693db commit e91975d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/util/OAuth2Util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ util.getTokens = function(settings, params, controller) {
6565
}
6666

6767
Util.triggerAfterError(controller, new Errors.OAuthError(error.message), settings);
68+
settings.callGlobalError(error);
6869
}
6970

7071
const authClient = settings.getAuthClient();

test/unit/spec/PrimaryAuth_spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3193,7 +3193,7 @@ Expect.describe('PrimaryAuth', function() {
31933193
});
31943194

31953195
// TODO: add test to verify the behavior when missing `state` in the data
3196-
itp('ignores messages with the wrong origin', function() {
3196+
itp('Rejects messages with the wrong origin', function() {
31973197
const successSpy = jasmine.createSpy('successSpy');
31983198
const errorSpy = jasmine.createSpy('errorSpy');
31993199

@@ -3218,7 +3218,7 @@ Expect.describe('PrimaryAuth', function() {
32183218
})
32193219
.then(function(test) {
32203220
expect(successSpy.calls.count()).toBe(0);
3221-
expect(errorSpy.calls.count()).toBe(0);
3221+
expect(errorSpy.calls.count()).toBe(1);
32223222
expect(test.afterErrorHandler).toHaveBeenCalledWith(
32233223
{
32243224
controller: 'primary-auth',

0 commit comments

Comments
 (0)