Skip to content

Commit d64df06

Browse files
403-specific error message (#48)
1 parent b480d60 commit d64df06

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

platform/viewer/src/connectedComponents/ViewerRetrieveStudyData.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const _showUserMessage = (queryParamApplied, message, dialog = {}) => {
144144
return;
145145
}
146146

147-
const { show: showUserMessage = () => {} } = dialog;
147+
const { show: showUserMessage = () => { } } = dialog;
148148
showUserMessage({
149149
message,
150150
});
@@ -416,10 +416,14 @@ function ViewerRetrieveStudyData({
416416

417417
if (error) {
418418
const content = JSON.stringify(error);
419-
if (content.includes('404') || content.includes('NOT_FOUND')) {
419+
if (error.status == 404 || content.includes('404') || content.includes('NOT_FOUND')) {
420420
return <NotFound />;
421421
}
422422

423+
if (error.status == 403) {
424+
return <NotFound message="You do not have access to this data" />;
425+
}
426+
423427
return <NotFound message="Failed to retrieve study data" />;
424428
}
425429

0 commit comments

Comments
 (0)