feat: Add error handler to CWIL
This commit is contained in:
1 parent
e7b32cc51e
commit
70e4c55920
4 files changed
+23
-1
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import cornerstone from 'cornerstone-core';
|
||||
import cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader';
|
||||
import dicomParser from 'dicom-parser';
|
||||
import { errorHandler } from '@ohif/core'
|
||||
|
||||
let initialized = false;
|
||||
|
||||
@@ -35,6 +36,9 @@ export default function initWADOImageLoader(UserAuthenticationService) {
|
||||
xhr.setRequestHeader('Authorization', headers.Authorization);
|
||||
}
|
||||
},
|
||||
errorInterceptor: error => {
|
||||
errorHandler.getHTTPErrorHandler(error)
|
||||
},
|
||||
});
|
||||
|
||||
initWebWorkers();
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
processSeriesResults,
|
||||
} from './qido.js';
|
||||
import dcm4cheeReject from './dcm4cheeReject';
|
||||
import { DicomMetadataStore, IWebApiDataSource, utils } from '@ohif/core';
|
||||
import { DicomMetadataStore, IWebApiDataSource, utils, errorHandler } from '@ohif/core';
|
||||
|
||||
import getImageId from './utils/getImageId';
|
||||
import dcmjs from 'dcmjs';
|
||||
@@ -52,11 +52,14 @@ function createDicomWebApi(dicomWebConfig, UserAuthenticationService) {
|
||||
const qidoConfig = {
|
||||
url: qidoRoot,
|
||||
headers: UserAuthenticationService.getAuthorizationHeader(),
|
||||
errorInterceptor: errorHandler.getHTTPErrorHandler(),
|
||||
|
||||
};
|
||||
|
||||
const wadoConfig = {
|
||||
url: wadoRoot,
|
||||
headers: UserAuthenticationService.getAuthorizationHeader(),
|
||||
errorInterceptor: errorHandler.getHTTPErrorHandler(),
|
||||
};
|
||||
|
||||
// TODO -> Two clients sucks, but its better than 1000.
|
||||
|
||||
Reference in new issue
Block a user