Skip to content

Commit ca9425d

Browse files
committed
Fix linking of errorInterceptor.
1 parent 1cc0269 commit ca9425d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/api.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ class DICOMwebClient {
7171
this.stowURL = this.baseURL;
7272
}
7373

74+
debugger;
75+
7476
this.headers = options.headers || {};
7577
this.errorInterceptor = options.errorInterceptor || function() {};
7678
}
@@ -87,6 +89,9 @@ class DICOMwebClient {
8789
}
8890

8991
_httpRequest(url, method, headers, options = {}) {
92+
93+
const {errorInterceptor} = this;
94+
9095
return new Promise((resolve, reject) => {
9196
const request = new XMLHttpRequest();
9297
request.open(method, url, true);
@@ -137,7 +142,7 @@ class DICOMwebClient {
137142
console.error(error);
138143
console.error(error.response);
139144

140-
this.errorInterceptor(error);
145+
errorInterceptor(error);
141146

142147
reject(error);
143148
}

0 commit comments

Comments
 (0)