diff --git a/src/main/java/org/ohdsi/webapi/util/GenericExceptionMapper.java b/src/main/java/org/ohdsi/webapi/util/GenericExceptionMapper.java index d53a2002f3..3784d67cb5 100644 --- a/src/main/java/org/ohdsi/webapi/util/GenericExceptionMapper.java +++ b/src/main/java/org/ohdsi/webapi/util/GenericExceptionMapper.java @@ -24,6 +24,7 @@ import org.springframework.messaging.support.ErrorMessage; import javax.ws.rs.BadRequestException; +import javax.ws.rs.ForbiddenException; import javax.ws.rs.NotFoundException; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @@ -57,7 +58,7 @@ public Response toResponse(Throwable ex) { String cause = ex.getCause().getCause().getMessage(); cause = cause.substring(cause.indexOf(DETAIL) + DETAIL.length()); ex = new RuntimeException(cause); - } else if (ex instanceof UnauthorizedException) { + } else if (ex instanceof UnauthorizedException || ex instanceof ForbiddenException) { responseStatus = Status.FORBIDDEN; } else if (ex instanceof NotFoundException) { responseStatus = Status.NOT_FOUND; diff --git a/src/main/resources/i18n/messages_en.json b/src/main/resources/i18n/messages_en.json index 7a3c216599..2dc1a78830 100644 --- a/src/main/resources/i18n/messages_en.json +++ b/src/main/resources/i18n/messages_en.json @@ -398,7 +398,9 @@ "overwriteConfirm": "Are you sure you want to overwrite current Concept Set Expression?", "loadingIncludedConcepts": "Loading Included Concepts", "commonAncestors": "Common Ancestors", - "loadingIncludedSourcecodes": "Loading Included Sourcecodes" + "loadingIncludedSourcecodes": "Loading Included Sourcecodes", + "expressionResolveError": "Error occurred during resolving expression!", + "forbiddenError": "You are not authorized to view the concept set expression." }, "conceptLegend": { "standard": "Standard", diff --git a/src/main/resources/i18n/messages_ko.json b/src/main/resources/i18n/messages_ko.json index 3d6f40f956..295cc557b8 100644 --- a/src/main/resources/i18n/messages_ko.json +++ b/src/main/resources/i18n/messages_ko.json @@ -349,7 +349,9 @@ "overwriteConfirm": "현재의 컨셉 세트 표현을 정말 덮어씌우시겠습니까?", "loadingIncludedConcepts": "포함된 컨셉 로딩 중", "commonAncestors": "공통 상위 컨셉", - "loadingIncludedSourcecodes": "포함된 소스 코드 로딩 중" + "loadingIncludedSourcecodes": "포함된 소스 코드 로딩 중", + "expressionResolveError": "Error occurred during resolving expression!", + "forbiddenError": "You are not authorized to view the concept set expression." }, "conceptLegend": { "standard": "표준", diff --git a/src/main/resources/i18n/messages_ru.json b/src/main/resources/i18n/messages_ru.json index 753df0bb82..1c4ef5b204 100644 --- a/src/main/resources/i18n/messages_ru.json +++ b/src/main/resources/i18n/messages_ru.json @@ -911,7 +911,9 @@ "overwriteConfirm": "Вы действительно хотите перезаписать текущее выражение набора концепций?", "loadingIncludedConcepts": "Загрузка включенных концепций", "commonAncestors": "Общие предки", - "loadingIncludedSourcecodes": "Загрузка включенных исходных кодов" + "loadingIncludedSourcecodes": "Загрузка включенных исходных кодов", + "expressionResolveError": "Ошибка загрузки выражения набора концепций!", + "forbiddenError": "Недостаточно прав для работы с выражением набора концепций." }, "conceptLegend": { "standard": "Стандартный", diff --git a/src/main/resources/i18n/messages_zh.json b/src/main/resources/i18n/messages_zh.json index e726f0cd38..f0b05608d4 100644 --- a/src/main/resources/i18n/messages_zh.json +++ b/src/main/resources/i18n/messages_zh.json @@ -398,7 +398,9 @@ "overwriteConfirm": "您确定要覆盖当前的概念集表达式吗?", "loadingIncludedConcepts": "加载包含的概念", "commonAncestors": "共同祖先", - "loadingIncludedSourcecodes": "加载包含的源代码" + "loadingIncludedSourcecodes": "加载包含的源代码", + "expressionResolveError": "Error occurred during resolving expression!", + "forbiddenError": "You are not authorized to view the concept set expression." }, "conceptLegend": { "standard": "标准",