From 4c71fa1a8756f94cbd48020507a3b1da37fc66cf Mon Sep 17 00:00:00 2001
From: Tor-Einar Skog <tor-einar.skog@nibio.no>
Date: Tue, 26 Apr 2022 14:20:04 +0200
Subject: [PATCH] Reducing the amount of debug output from a config value
 exception

---
 src/main/java/no/nibio/vips/core/service/ModelResourceImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/no/nibio/vips/core/service/ModelResourceImpl.java b/src/main/java/no/nibio/vips/core/service/ModelResourceImpl.java
index e13f926..2741592 100755
--- a/src/main/java/no/nibio/vips/core/service/ModelResourceImpl.java
+++ b/src/main/java/no/nibio/vips/core/service/ModelResourceImpl.java
@@ -343,7 +343,7 @@ public class ModelResourceImpl implements ModelResource{
             Logger.getLogger(ModelResourceImpl.class.getName()).log(Level.SEVERE, null, ex);
             if(ex instanceof ConfigValidationException){
             
-                throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST).entity(ex).build());
+                throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST).entity(ex.getMessage()).build());
             }
             else
             {
-- 
GitLab