Skip to content

Commit 1cc0269

Browse files
committed
Error interceptor
1 parent 0b2b86e commit 1cc0269

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/api.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class DICOMwebClient {
7272
}
7373

7474
this.headers = options.headers || {};
75+
this.errorInterceptor = options.errorInterceptor || function() {};
7576
}
7677

7778
static _parseQueryParameters(params = {}) {
@@ -136,6 +137,8 @@ class DICOMwebClient {
136137
console.error(error);
137138
console.error(error.response);
138139

140+
this.errorInterceptor(error);
141+
139142
reject(error);
140143
}
141144
}

0 commit comments

Comments
 (0)