Skip to content

Commit ab454fc

Browse files
authored
Merge pull request #43 from protegeproject/implemente-deletion-of-entity
better handling of cause message on response.
2 parents 070d9a8 + 3819fd4 commit ab454fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/edu/stanford/protege/webprotege/gateway/RpcRequestProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ private CompletableFuture<RpcResponse> sendMessage(RpcRequest request, String ac
114114
try {
115115
var executionException = objectMapper.readValue(errorHeader, CommandExecutionException.class);
116116
var httpStatus = executionException.getStatus();
117-
var errorMessage = httpStatus.getReasonPhrase() + " in " + applicationName;
117+
var errorMessage = executionException.getCauseMessage() == null || executionException.getCauseMessage().isEmpty() ? httpStatus.getReasonPhrase() + " in " + applicationName : executionException.getCauseMessage();
118118
return RpcResponse.forError(request.methodName(),
119119
new RpcError(httpStatus.value(),
120120
errorMessage, Collections.emptyMap()));

0 commit comments

Comments
 (0)