diff --git a/webapp/src/main/java/org/gcube/resourcemanagement/manager/webapp/context/DeleteRequest.java b/webapp/src/main/java/org/gcube/resourcemanagement/manager/webapp/context/DeleteRequest.java index 2721f7f..7efc330 100644 --- a/webapp/src/main/java/org/gcube/resourcemanagement/manager/webapp/context/DeleteRequest.java +++ b/webapp/src/main/java/org/gcube/resourcemanagement/manager/webapp/context/DeleteRequest.java @@ -43,10 +43,10 @@ public final class DeleteRequest extends RequestToResourceRegistry { try { boolean deleted = this.getContextClient().delete(context); if (!deleted) { - ResponseFromResourceRegistry.fromErrorCode(RMDeleteContextCode.GENERIC_ERROR_FROM_RR); + return ResponseFromResourceRegistry.fromErrorCode(RMDeleteContextCode.GENERIC_ERROR_FROM_RR); } } catch (ResourceRegistryException e) { - ResponseFromResourceRegistry.fromErrorCode(RMDeleteContextCode.GENERIC_ERROR_FROM_RR); + return ResponseFromResourceRegistry.fromErrorCode(RMDeleteContextCode.GENERIC_ERROR_FROM_RR); } return ResponseFromResourceRegistry.newSuccessResponseWithMessage("Context successfully deleted");