You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Promise.reject instead of throw in the api response interceptor (qlik-oss#267)
* Use Promise.reject instead of throw in the api response interceptor
This is to play nice with the error logging in the angular 1.x Promise implementation (used in the sense client)
(Most of the time we get this error it is not an actual error but just the client testing if an object exists)
* Use promise constructor to reject interceptors
* Fix typo in intercept test
* Update code style to match other interceptors
it('should throw if the response contains an error',()=>errorInterceptor(session,{},{error: {code: 2,parameter: 'param',message: 'msg'}}).catch((err)=>{
8
+
expect(errinstanceofError).to.equal(true);
9
+
expect(err.code).to.equal(2);
10
+
expect(err.parameter).to.equal('param');
11
+
expect(err.message).to.equal('msg');
12
+
expect(err.stack).to.be.a('string');
13
+
// check if the test file is included in the stack trace:
0 commit comments