Skip to content

Commit 58bcb3b

Browse files
Throw error if diagram-server returns HttpStatus.FORBIDDEN (#840)
* Throw error if diagram-server returns HttpStatus.FORBIDDEN Signed-off-by: BOUTIER Charly <[email protected]>
1 parent 489f827 commit 58bcb3b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/gridsuite/study/server/service/SingleLineDiagramService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ public String getNetworkAreaDiagram(UUID networkUuid, String variantId, String n
193193
throw new StudyException(SVG_NOT_FOUND, VOLTAGE_LEVEL + NOT_FOUND);
194194
} else if (HttpStatus.BAD_REQUEST.equals(e.getStatusCode())) {
195195
throw new StudyException(BAD_PARAMETER, e.getMessage());
196+
} else if (HttpStatus.FORBIDDEN.equals(e.getStatusCode())) {
197+
throw handleHttpError(e, NOT_ALLOWED);
196198
} else {
197199
throw e;
198200
}

0 commit comments

Comments
 (0)