fix(ui): display error in ui while loading seg (#4433)

This commit is contained in:
Pedro H. Köhler authored and GitHub committed 2024-10-29 19:14:34 -04:00
1 parent 543c31109b
commit 2e96371b06
2 files changed
+23 -7

No files matched your search

@@ -242,7 +242,18 @@ class CornerstoneCacheService {
if (displaySet.load && displaySet.load instanceof Function) {
const { userAuthenticationService } = this.servicesManager.services;
const headers = userAuthenticationService.getAuthorizationHeader();
await displaySet.load({ headers });
try {
await displaySet.load({ headers });
} catch (e) {
const { uiNotificationService } = this.servicesManager.services;
uiNotificationService.show({
title: 'Error loading displaySet',
message: e.message,
type: 'error',
});
console.error(e);
}
// Parametric maps have a `load` method but it should not be loaded in the
// same way as SEG and RTSTRUCT but like a normal volume