From 77b0722bf110017f01d1ddf401a49211a0b6aeaf Mon Sep 17 00:00:00 2001 From: "manuele.simi" Date: Thu, 28 Dec 2017 05:14:55 +0000 Subject: [PATCH] Initialize CodeException from ErrorCode instead of RMCode. git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161923 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../manager/io/exceptions/CodeException.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeException.java b/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeException.java index 38f8e56..989f543 100644 --- a/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeException.java +++ b/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeException.java @@ -16,14 +16,14 @@ public class CodeException extends WebApplicationException { private final int errorCode; private final String errorMsg; - public CodeException(Response.Status status, RMCode code) { + public CodeException(Response.Status status, ErrorCode code) { super(Response.status(status).entity(new CodeEntity(new SerializableErrorCode(code.getId(), code.getMessage()))) .build()); this.errorMsg = code.getMessage(); this.errorCode = code.getId(); } - public CodeException(RMCode code) { + public CodeException(ErrorCode code) { super(Response.status(Response.Status.NOT_ACCEPTABLE) .entity(new CodeEntity(new SerializableErrorCode(code.getId(), code.getMessage()))).build()); this.errorMsg = code.getMessage();