Compare commits

..
Author SHA1 Message Date
ohif-bot 0e736e7a56 chore(release): publish [skip ci]
- @ohif/viewer@4.8.10
2021-02-08 11:56:46 +00:00
Igor Octaviano d246cd9842 Merge pull request #2267 from OHIF/IDC-2251
IDC-2251: Add error page and not found pages if failed to retrieve study data
2021-02-08 08:53:35 -03:00
igoroctaviano 4fa1eb683d Merge branch 'master' of github.com:OHIF/Viewers into IDC-2251 2021-02-07 22:29:45 -03:00
igoroctaviano d97270f995 Merge branch 'master' of github.com:OHIF/Viewers into IDC-2251 2021-02-05 17:00:06 -03:00
igoroctaviano 7c5f9c44b6 Add error page and not found pages if failed to retrieve study data 2021-02-03 13:58:46 -03:00
3 changed files with 20 additions and 6 deletions

No files matched your search

+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [4.8.10](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.8.9...@ohif/viewer@4.8.10) (2021-02-08)
**Note:** Version bump only for package @ohif/viewer
## [4.8.9](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.8.8...@ohif/viewer@4.8.9) (2021-02-05)
**Note:** Version bump only for package @ohif/viewer
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/viewer",
"version": "4.8.9",
"version": "4.8.10",
"description": "OHIF Viewer",
"author": "OHIF Contributors",
"license": "MIT",
@@ -5,10 +5,11 @@ import usePrevious from '../customHooks/usePrevious';
import ConnectedViewer from './ConnectedViewer.js';
import PropTypes from 'prop-types';
import { extensionManager } from './../App.js';
import { useSnackbarContext } from '@ohif/ui';
import { useSnackbarContext, ErrorPage } from '@ohif/ui';
// Contexts
import AppContext from '../context/AppContext';
import NotFound from '../routes/NotFound';
const { OHIFStudyMetadata, OHIFSeriesMetadata } = metadata;
const { retrieveStudiesMetadata, deleteStudyMetadataPromise } = studies;
@@ -291,7 +292,7 @@ function ViewerRetrieveStudyData({
})
.catch(error => {
if (error && !error.isCanceled) {
setError(true);
setError(error);
log.error(error);
}
});
@@ -358,13 +359,13 @@ function ViewerRetrieveStudyData({
})
.catch(error => {
if (error && !error.isCanceled) {
setError(true);
setError(error);
log.error(error);
}
});
} catch (error) {
if (error) {
setError(true);
setError(error);
log.error(error);
}
}
@@ -411,7 +412,12 @@ function ViewerRetrieveStudyData({
}, []);
if (error) {
return <div>Error: {JSON.stringify(error)}</div>;
const content = JSON.stringify(error);
if (content.includes('404') || content.includes('NOT_FOUND')) {
return <NotFound />;
}
return <NotFound message="Failed to retrieve study data" />;
}
return (