diff --git a/core/src/main/java/de/ids_mannheim/korap/config/ClientInfo.java b/core/src/main/java/de/ids_mannheim/korap/config/ClientInfo.java
index 5344b98..bf98fe9 100644
--- a/core/src/main/java/de/ids_mannheim/korap/config/ClientInfo.java
+++ b/core/src/main/java/de/ids_mannheim/korap/config/ClientInfo.java
@@ -1,6 +1,8 @@
 package de.ids_mannheim.korap.config;
 
 import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.utils.JsonUtils;
 import lombok.Data;
 
@@ -28,7 +30,7 @@
     }
 
 
-    public String toJSON () {
+    public String toJSON () throws KustvaktException {
         ObjectNode node = JsonUtils.createObjectNode();
         node.put("client_id", client_id);
         node.put("client_secret", client_secret);
diff --git a/core/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java b/core/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
index 7c3a1cf..7b75f37 100644
--- a/core/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
+++ b/core/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
@@ -96,6 +96,12 @@
 
 	private String ldapConfig;
 
+    private String freeOnlyRegex;
+
+    private String publicOnlyRegex;
+
+    private String allOnlyRegex;
+
 	public KustvaktConfiguration (Properties properties) throws IOException {
         load(properties);
     }
@@ -172,25 +178,16 @@
         
         ldapConfig = properties.getProperty("ldap.config");
         
-        // EM: regex for matching availability in Krill matches
-        freeLicensePattern = compilePattern(properties.getProperty("kustvakt.regex.free",""));
-        publicLicensePattern = compilePattern(properties.getProperty("kustvakt.regex.public",""));
-        allLicensePattern = compilePattern(properties.getProperty("kustvakt.regex.all",""));
+        // EM: regex used for storing vc
+        freeOnlyRegex = properties.getProperty("kustvakt.regex.free","");
+        publicOnlyRegex = properties.getProperty("kustvakt.regex.public","");
+        allOnlyRegex = properties.getProperty("kustvakt.regex.all","");
         
-        // EM: not use in the future
-        //policyConfig = properties.getProperty("policies.config");
-        //setFoundriesAndLayers(policyConfig);
+        // EM: pattern for matching availability in Krill matches
+        freeLicensePattern = compilePattern(freeOnlyRegex);
+        publicLicensePattern = compilePattern(freeOnlyRegex + "|" + publicOnlyRegex);
+        allLicensePattern = compilePattern(freeOnlyRegex + "|" + publicOnlyRegex + "|"+allOnlyRegex);
         
-//        KUSTVAKT_USER.put(Attributes.ID, Integer.parseInt(properties.getProperty("kustvakt.init.user.id")));
-//        KUSTVAKT_USER.put(Attributes.USERNAME, properties.getProperty("kustvakt.init.user.username"));
-//        KUSTVAKT_USER.put(Attributes.PASSWORD, properties.getProperty("kustvakt.init.user.password"));
-//        KUSTVAKT_USER.put(Attributes.EMAIL, properties.getProperty("kustvakt.init.user.email"));
-//        KUSTVAKT_USER.put(Attributes.COUNTRY, properties.getProperty("kustvakt.init.user.country"));
-//        KUSTVAKT_USER.put(Attributes.ADDRESS, properties.getProperty("kustvakt.init.user.address"));
-//        KUSTVAKT_USER.put(Attributes.FIRSTNAME, properties.getProperty("kustvakt.init.user.firstname"));
-//        KUSTVAKT_USER.put(Attributes.LASTNAME, properties.getProperty("kustvakt.init.user.lastname"));
-//        KUSTVAKT_USER.put(Attributes.INSTITUTION, properties.getProperty("kustvakt.init.user.institution"));
-//        KUSTVAKT_USER.put(Attributes.IS_ADMIN, properties.getProperty("kustvakt.init.user.admin"));
         return properties;
     }
 
diff --git a/core/src/main/java/de/ids_mannheim/korap/config/Scopes.java b/core/src/main/java/de/ids_mannheim/korap/config/Scopes.java
index 0262cc2..1cc07cf 100644
--- a/core/src/main/java/de/ids_mannheim/korap/config/Scopes.java
+++ b/core/src/main/java/de/ids_mannheim/korap/config/Scopes.java
@@ -1,5 +1,6 @@
 package de.ids_mannheim.korap.config;
 
+import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.user.Userdata;
 import de.ids_mannheim.korap.utils.JsonUtils;
 
@@ -80,7 +81,7 @@
     }
 
 
-    public String toEntity () {
+    public String toEntity () throws KustvaktException {
         if (this.values.isEmpty())
             return "";
         return JsonUtils.toJSON(this.values);
diff --git a/core/src/main/java/de/ids_mannheim/korap/exceptions/KustvaktException.java b/core/src/main/java/de/ids_mannheim/korap/exceptions/KustvaktException.java
index e435b5b..2352b57 100644
--- a/core/src/main/java/de/ids_mannheim/korap/exceptions/KustvaktException.java
+++ b/core/src/main/java/de/ids_mannheim/korap/exceptions/KustvaktException.java
@@ -81,6 +81,11 @@
         this.statusCode = status;
         this.entity = entity;
     }
+    
+    public KustvaktException (int status, String message, Exception e) {
+        super(message, e);
+        this.statusCode = status;
+    }
 
 
     public KustvaktException (Throwable cause, int status) {
diff --git a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewrite.java b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewrite.java
index 189cdd5..e2e6318 100644
--- a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewrite.java
+++ b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewrite.java
@@ -22,6 +22,7 @@
 /**
  * @author margaretha
  * @date 2 June 2017
+ * @last 9 Nov 2017
  */
 public class CollectionRewrite implements RewriteTask.RewriteQuery {
 
@@ -63,21 +64,21 @@
         List<String> userAvailabilities = new ArrayList<String>();
         switch (user.getCorpusAccess()) {
             case PUB:
-                userAvailabilities.add("CC-BY.*");
-                userAvailabilities.add("ACA.*");
+                userAvailabilities.add(config.getFreeOnlyRegex());
+                userAvailabilities.add(config.getPublicOnlyRegex());
 //                builder.with(
 //                        "availability = /CC-BY.*/ | availability = /ACA.*/");
                 break;
             case ALL:
-                userAvailabilities.add("CC-BY.*");
-                userAvailabilities.add("ACA.*");
-                userAvailabilities.add("QAO.*");
+                userAvailabilities.add(config.getFreeOnlyRegex());
+                userAvailabilities.add(config.getPublicOnlyRegex());
+                userAvailabilities.add(config.getAllOnlyRegex());
 
 //                builder.with("availability = /QAO.*/ | availability = /ACA.*/ |"
 //                        + "  availability = /CC-BY.*/");
                 break;
             case FREE:
-                userAvailabilities.add("CC-BY.*");
+                userAvailabilities.add(config.getFreeOnlyRegex());
 //                builder.with("availability   = /CC-BY.*/");
                 break;
         }
diff --git a/core/src/main/java/de/ids_mannheim/korap/resources/KustvaktResource.java b/core/src/main/java/de/ids_mannheim/korap/resources/KustvaktResource.java
index 20908ad..6412835 100644
--- a/core/src/main/java/de/ids_mannheim/korap/resources/KustvaktResource.java
+++ b/core/src/main/java/de/ids_mannheim/korap/resources/KustvaktResource.java
@@ -112,7 +112,7 @@
     }
 
 
-    public String getStringData () {
+    public String getStringData () throws KustvaktException {
         return JsonUtils.toJSON(this.fields);
     }
 
diff --git a/core/src/main/java/de/ids_mannheim/korap/resources/ResourceFactory.java b/core/src/main/java/de/ids_mannheim/korap/resources/ResourceFactory.java
index 76cc144..7d2b770 100644
--- a/core/src/main/java/de/ids_mannheim/korap/resources/ResourceFactory.java
+++ b/core/src/main/java/de/ids_mannheim/korap/resources/ResourceFactory.java
@@ -66,7 +66,7 @@
     }
 
 
-    public static <T extends KustvaktResource> T createID (T resource) {
+    public static <T extends KustvaktResource> T createID (T resource) throws KustvaktException {
         if (resource.getData() != null && !resource.getStringData().isEmpty()){
         	resource.setPersistentID(DigestUtils.sha1Hex(JsonUtils.toJSON(resource)));        	
         }
@@ -110,7 +110,7 @@
 
 
     public static VirtualCollection getPermanentCollection (
-            VirtualCollection mergable, String corpusName, String description) {
+            VirtualCollection mergable, String corpusName, String description) throws KustvaktException {
         VirtualCollection v = new VirtualCollection();
         v.merge(mergable);
         v.setName(corpusName);
diff --git a/core/src/main/java/de/ids_mannheim/korap/security/auth/BasicHttpAuth.java b/core/src/main/java/de/ids_mannheim/korap/security/auth/BasicHttpAuth.java
index 0da09f1..ba1a26c 100644
--- a/core/src/main/java/de/ids_mannheim/korap/security/auth/BasicHttpAuth.java
+++ b/core/src/main/java/de/ids_mannheim/korap/security/auth/BasicHttpAuth.java
@@ -1,6 +1,11 @@
 package de.ids_mannheim.korap.security.auth;
 
-import com.sun.org.apache.xpath.internal.SourceTree;
+import java.util.Map;
+
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.BeansFactory;
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.config.Scopes;
@@ -9,18 +14,11 @@
 import de.ids_mannheim.korap.interfaces.AuthenticationIface;
 import de.ids_mannheim.korap.interfaces.EncryptionIface;
 import de.ids_mannheim.korap.interfaces.db.EntityHandlerIface;
-import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.KorAPUser;
 import de.ids_mannheim.korap.user.TokenContext;
 import de.ids_mannheim.korap.user.User;
-import de.ids_mannheim.korap.utils.NamingUtils;
 import de.ids_mannheim.korap.utils.StringUtils;
 import de.ids_mannheim.korap.utils.TimeUtils;
-import org.apache.commons.codec.binary.Base64;
-import org.apache.oltu.oauth2.common.utils.OAuthUtils;
-
-import java.beans.Beans;
-import java.util.Map;
 
 /**
  * @author hanl
@@ -29,8 +27,13 @@
 // todo: bean injection!
 public class BasicHttpAuth implements AuthenticationIface {
 
+    @Autowired
     private KustvaktConfiguration config;
-
+    @Autowired
+    private EncryptionIface crypto;
+    @Autowired
+    private EntityHandlerIface dao;
+    
     public BasicHttpAuth() {
 
     }
@@ -77,11 +80,6 @@
     public TokenContext getTokenContext(String authToken)
             throws KustvaktException {
         //fixme: handle via constructor
-        this.config = BeansFactory.getKustvaktContext().getConfiguration();
-        EncryptionIface crypto = BeansFactory.getKustvaktContext()
-                .getEncryption();
-        EntityHandlerIface dao = BeansFactory.getKustvaktContext()
-                .getUserDBHandler();
         String[] values = decode(authToken);
         if (values != null) {
             TokenContext c = new TokenContext();
diff --git a/core/src/main/java/de/ids_mannheim/korap/user/DataFactory.java b/core/src/main/java/de/ids_mannheim/korap/user/DataFactory.java
index e9b1387..4b14b42 100644
--- a/core/src/main/java/de/ids_mannheim/korap/user/DataFactory.java
+++ b/core/src/main/java/de/ids_mannheim/korap/user/DataFactory.java
@@ -65,7 +65,7 @@
     public abstract boolean removeValue (Object data, String field);
 
 
-    public abstract String toStringValue (Object data);
+    public abstract String toStringValue (Object data) throws KustvaktException;
 
     public abstract Object filter(Object data, String ... keys);
 
@@ -210,7 +210,7 @@
 
 
         @Override
-        public String toStringValue (Object data) {
+        public String toStringValue (Object data) throws KustvaktException {
             if (data instanceof JsonNode)
                 return JsonUtils.toJSON(data);
             return data.toString();
diff --git a/core/src/main/java/de/ids_mannheim/korap/user/TokenContext.java b/core/src/main/java/de/ids_mannheim/korap/user/TokenContext.java
index d3b1944..9748861 100644
--- a/core/src/main/java/de/ids_mannheim/korap/user/TokenContext.java
+++ b/core/src/main/java/de/ids_mannheim/korap/user/TokenContext.java
@@ -137,7 +137,7 @@
     }
 
 
-    public String toJson() {
+    public String toJson() throws KustvaktException {
         return JsonUtils.toJSON(this.statusMap());
     }
 
diff --git a/core/src/main/java/de/ids_mannheim/korap/utils/JsonUtils.java b/core/src/main/java/de/ids_mannheim/korap/utils/JsonUtils.java
index d011ba7..b018688 100644
--- a/core/src/main/java/de/ids_mannheim/korap/utils/JsonUtils.java
+++ b/core/src/main/java/de/ids_mannheim/korap/utils/JsonUtils.java
@@ -26,12 +26,13 @@
     private JsonUtils () {}
 
 
-    public static String toJSON (Object values) {
+    public static String toJSON (Object values) throws KustvaktException {
         try {
             return mapper.writeValueAsString(values);
         }
         catch (JsonProcessingException e) {
-            return e.getMessage();
+            throw new KustvaktException(StatusCodes.SERIALIZATION_FAILED,
+                    "Failed serializing object in json", e);
         }
     }
 
@@ -90,7 +91,7 @@
         }
         catch (IOException e) {
             throw new KustvaktException(StatusCodes.DESERIALIZATION_FAILED,
-                    "Failed deserializing json object: " + json, json, e);
+                    e.getMessage(), json, e);
         }
         return t;
     }
diff --git a/core/src/main/java/de/ids_mannheim/korap/utils/KoralCollectionQueryBuilder.java b/core/src/main/java/de/ids_mannheim/korap/utils/KoralCollectionQueryBuilder.java
index 361ab2b..71b8d57 100644
--- a/core/src/main/java/de/ids_mannheim/korap/utils/KoralCollectionQueryBuilder.java
+++ b/core/src/main/java/de/ids_mannheim/korap/utils/KoralCollectionQueryBuilder.java
@@ -2,8 +2,6 @@
 
 import java.util.List;
 
-import javax.ws.rs.WebApplicationException;
-
 import org.springframework.beans.factory.annotation.Autowired;
 
 import com.fasterxml.jackson.databind.JsonNode;
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/AdminController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/AdminController.java
index 53f0acf..c12f5cf 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/AdminController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/AdminController.java
@@ -85,9 +85,15 @@
         catch (NumberFormatException | NullPointerException e) {
             throw kustvaktResponseHandler.throwit(StatusCodes.ILLEGAL_ARGUMENT);
         }
-        String result = JsonUtils.toJSON(auditingController.retrieveRecords(
-                AuditRecord.CATEGORY.valueOf(type.toUpperCase()), from_date,
-                until_date, dayOnly, integer_limit));
+        String result="";
+        try {
+            result = JsonUtils.toJSON(auditingController.retrieveRecords(
+                    AuditRecord.CATEGORY.valueOf(type.toUpperCase()), from_date,
+                    until_date, dayOnly, integer_limit));
+        }
+        catch (KustvaktException e) {
+            throw kustvaktResponseHandler.throwit(e);
+        }
         // limit number of records to return
         return Response.ok(result).build();
     }
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/AnnotationController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/AnnotationController.java
index ac4f69f..dbeb447 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/AnnotationController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/AnnotationController.java
@@ -57,8 +57,12 @@
     @GET
     @Path("layers")
     public Response getLayers () {
-        String result = JsonUtils.toJSON(annotationService.getLayerDtos());
-        return Response.ok(result).build();
+        try {
+            return Response.ok(JsonUtils.toJSON(annotationService.getLayerDtos())).build();
+        }
+        catch (KustvaktException e) {
+            throw responseHandler.throwit(e);
+        }
     }
 
 
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/AuthenticationController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/AuthenticationController.java
index f772224..75a772e 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/AuthenticationController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/AuthenticationController.java
@@ -88,7 +88,12 @@
                 .getQueryLanguages());
         m.put("SortTypes", null); // types of sorting that are supported!
         m.put("version", ServiceInfo.getInfo().getVersion());
-        return Response.ok(JsonUtils.toJSON(m)).build();
+        try {
+            return Response.ok(JsonUtils.toJSON(m)).build();
+        }
+        catch (KustvaktException e) {
+            throw kustvaktResponseHandler.throwit(e);
+        }
     }
 
 
@@ -102,7 +107,12 @@
             @HeaderParam(ContainerRequest.HOST) String host,
             @Context Locale locale) {
         TokenContext ctx = (TokenContext) context.getUserPrincipal();
-        return Response.ok(ctx.toJson()).build();
+        try {
+            return Response.ok(ctx.toJson()).build();
+        }
+        catch (KustvaktException e) {
+            throw kustvaktResponseHandler.throwit(e);
+        }
     }
 
 
@@ -200,7 +210,12 @@
             throw kustvaktResponseHandler.throwit(e);
         }
 
-        return Response.ok(context.toJson()).build();
+        try {
+            return Response.ok(context.toJson()).build();
+        }
+        catch (KustvaktException e) {
+            throw kustvaktResponseHandler.throwit(e);
+        }
     }
 
 
@@ -299,7 +314,12 @@
         catch (KustvaktException e) {
             throw kustvaktResponseHandler.throwit(e);
         }
-        return Response.ok().entity(context.toJson()).build();
+        try {
+            return Response.ok().entity(context.toJson()).build();
+        }
+        catch (KustvaktException e) {
+            throw kustvaktResponseHandler.throwit(e);
+        }
     }
 
 
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/KustvaktController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/KustvaktController.java
index f581f37..cf3cfaa 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/KustvaktController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/KustvaktController.java
@@ -1,11 +1,14 @@
 package de.ids_mannheim.korap.web.controller;
 
+import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.server.KustvaktServer;
 import de.ids_mannheim.korap.utils.JsonUtils;
 import de.ids_mannheim.korap.utils.ServiceInfo;
+import de.ids_mannheim.korap.web.utils.KustvaktResponseHandler;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
@@ -22,6 +25,8 @@
 public class KustvaktController {
 
     private static Logger jlog = LoggerFactory.getLogger(UserController.class);
+    @Autowired
+    private KustvaktResponseHandler kustvaktResponseHandler;
 
 
     @Path("info")
@@ -30,7 +35,12 @@
         m.put("version", ServiceInfo.getInfo().getVersion());
         m.put("recent_api_version", KustvaktServer.API_VERSION);
         m.put("service_name", ServiceInfo.getInfo().getName());
-        return Response.ok(JsonUtils.toJSON(m)).build();
+        try {
+            return Response.ok(JsonUtils.toJSON(m)).build();
+        }
+        catch (KustvaktException e) {
+            throw kustvaktResponseHandler.throwit(e);
+        }
     }
 
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuthController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuthController.java
index c21c406..2bc03d7 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuthController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuthController.java
@@ -110,14 +110,16 @@
                     "Missing parameter!", "redirect_url");
         info.setRedirect_uri(rurl);
         TokenContext ctx = (TokenContext) context.getUserPrincipal();
+        String json = "";
         try {
             User user = this.controller.getUser(ctx.getUsername());
             this.handler.getPersistenceHandler().registerClient(info, user);
+            json = info.toJSON();
         }
         catch (KustvaktException e) {
             throw kustvaktResponseHandler.throwit(e);
         }
-        return Response.ok(info.toJSON()).build();
+        return Response.ok(json).build();
     }
 
 
@@ -128,20 +130,21 @@
             @QueryParam("scope") String scopes) {
         TokenContext ctx = (TokenContext) context.getUserPrincipal();
         Userdata data;
+        String json= "";
         try {
             User user = this.controller.getUser(ctx.getUsername());
             data = this.controller.getUserData(user, UserDetails.class);
             Set<String> base_scope = StringUtils.toSet(scopes, " ");
             base_scope.retainAll(StringUtils.toSet(scopes));
             scopes = StringUtils.toString(base_scope);
+            json = JsonUtils.toJSON(Scopes.mapScopes(scopes, data));
         }
         catch (KustvaktException e) {
             throw kustvaktResponseHandler.throwit(e);
         }
         // json format with scope callback parameter
         // todo: add other scopes as well!
-        return Response.ok(JsonUtils.toJSON(Scopes.mapScopes(scopes, data)))
-                .build();
+        return Response.ok(json).build();
     }
 
 
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/ResourceController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/ResourceController.java
index 103072e..d64e5bd 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/ResourceController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/ResourceController.java
@@ -11,6 +11,7 @@
 
 import com.sun.jersey.spi.container.ResourceFilters;
 
+import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.service.ResourceService;
 import de.ids_mannheim.korap.utils.JsonUtils;
 import de.ids_mannheim.korap.web.filter.PiwikFilter;
@@ -40,7 +41,14 @@
     @GET
     @Path("info")
     public Response getAllResourceInfo () {
-        String result = JsonUtils.toJSON(resourceService.getResourceDtos());
+        String result = "";
+        try {
+            result = JsonUtils.toJSON(resourceService.getResourceDtos());
+        }
+        catch (KustvaktException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
         return Response.ok(result).build();
     }
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java
index 5e37692..3c4f33d 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java
@@ -336,19 +336,20 @@
         // EM: is this necessary at all?
         KustvaktResource resource = isCollectionIdValid(ctx.getName(), id);
         if (resource != null) {
-            if (resource instanceof VirtualCollection) {
-                JsonNode node = cquery.and().mergeWith(resource.getData());
-                query = JsonUtils.toJSON(node);
-            }
-            else if (resource instanceof Corpus) {
-                cquery.and().with(Attributes.CORPUS_SIGLE, "=",
-                        resource.getPersistentID());
-                try {
+            try {
+                if (resource instanceof VirtualCollection) {
+                    JsonNode node = cquery.and().mergeWith(resource.getData());
+                    query = JsonUtils.toJSON(node);
+                }
+                else if (resource instanceof Corpus) {
+                    cquery.and().with(Attributes.CORPUS_SIGLE, "=",
+                            resource.getPersistentID());
+
                     query = cquery.toJSON();
                 }
-                catch (KustvaktException e) {
-                   throw responseHandler.throwit(e);
-                }
+            }
+            catch (KustvaktException e) {
+                throw responseHandler.throwit(e);
             }
         }
 
@@ -555,26 +556,28 @@
             jlog.error("Failed retrieving resource: {}", e.string());
             throw responseHandler.throwit(e);
         }
+        try {
+            if (resource instanceof VirtualCollection) {
+                // test this
+                //builder.setBaseQuery(resource.getData());
+                return JsonUtils
+                        .toJSON(builder.and().mergeWith(resource.getData()));
+            }
+            else if (resource instanceof Corpus) {
+                builder.and().with(Attributes.CORPUS_SIGLE, "=",
+                        resource.getPersistentID());
 
-        if (resource instanceof VirtualCollection) {
-            // test this
-            //builder.setBaseQuery(resource.getData());
-            return JsonUtils
-                    .toJSON(builder.and().mergeWith(resource.getData()));
-        }
-        else if (resource instanceof Corpus) {
-            builder.and().with(Attributes.CORPUS_SIGLE, "=",
-                    resource.getPersistentID());
-            try {
                 return builder.toJSON();
             }
-            catch (KustvaktException e) {
-                throw responseHandler.throwit(e);
+
+
+            else {
+                throw responseHandler.throwit(StatusCodes.ILLEGAL_ARGUMENT,
+                        "Type parameter not supported", type);
             }
         }
-        else {
-            throw responseHandler.throwit(StatusCodes.ILLEGAL_ARGUMENT,
-                    "Type parameter not supported", type);
+        catch (KustvaktException e) {
+            throw responseHandler.throwit(e);
         }
     }
 
@@ -620,7 +623,12 @@
         Map vals = new HashMap();
         vals.put("id", cache.getId());
         vals.put("statistics", cache.getStats());
-        return Response.ok(JsonUtils.toJSON(vals)).build();
+        try {
+            return Response.ok(JsonUtils.toJSON(vals)).build();
+        }
+        catch (KustvaktException e) {
+            throw responseHandler.throwit(e);
+        }
     }
 
 
@@ -736,7 +744,7 @@
                     base = JsonUtils.readTree(query);
                 }
                 catch (KustvaktException e) {
-                  responseHandler.throwit(e);
+                    responseHandler.throwit(e);
                 }
             else
                 // todo: throw exception response for no resource to save!
@@ -775,7 +783,12 @@
                 throw responseHandler.throwit(e);
             }
         }
-        return Response.ok(JsonUtils.toJSON(vals)).build();
+        try {
+            return Response.ok(JsonUtils.toJSON(vals)).build();
+        }
+        catch (KustvaktException e) {
+            throw responseHandler.throwit(e);
+        }
     }
 
 
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/UserController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/UserController.java
index ff8ccf9..b181178 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/UserController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/UserController.java
@@ -116,7 +116,12 @@
             object.put("confirm_uri", uriBuilder.build());
             object.put("uri_expiration",
                     TimeUtils.format(uri.getUriExpiration()));
-            return Response.ok(JsonUtils.toJSON(object)).build();
+            try {
+                return Response.ok(JsonUtils.toJSON(object)).build();
+            }
+            catch (KustvaktException e) {
+                throw kustvaktResponseHandler.throwit(e);
+            }
         }
         else {
             jlog.error("Failed creating confirmation and expiry tokens.");
@@ -224,7 +229,12 @@
         ObjectNode obj = JsonUtils.createObjectNode();
         obj.put(Attributes.URI, builder.toString());
         obj.put(Attributes.URI_EXPIRATION, objects[1].toString());
-        return Response.ok(JsonUtils.toJSON(obj)).build();
+        try {
+            return Response.ok(JsonUtils.toJSON(obj)).build();
+        }
+        catch (KustvaktException e) {
+            throw kustvaktResponseHandler.throwit(e);
+        }
     }
 
 
@@ -271,7 +281,12 @@
             throw kustvaktResponseHandler
                     .throwAuthenticationException(ctx.getUsername());
         }
-        return Response.ok(m.toEntity()).build();
+        try {
+            return Response.ok(m.toEntity()).build();
+        }
+        catch (KustvaktException e) {
+            throw kustvaktResponseHandler.throwit(e);
+        }
     }
 
 
@@ -444,7 +459,12 @@
             jlog.error("Exception encountered!", e);
             throw kustvaktResponseHandler.throwit(e);
         }
-        return Response.ok(JsonUtils.toJSON(add)).build();
+        try {
+            return Response.ok(JsonUtils.toJSON(add)).build();
+        }
+        catch (KustvaktException e) {
+            throw kustvaktResponseHandler.throwit(e);
+        }
     }
 
 
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java
index ff8df15..4815ac3 100644
--- a/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java
@@ -47,7 +47,7 @@
 
 
     @Test
-    public void testCollQuery () throws IOException {
+    public void testCollQuery () throws IOException, KustvaktException {
         String qstring = "creationDate since 1800 & creationDate until 1820";
         CollectionQueryProcessor processor = new CollectionQueryProcessor();
         processor.process(qstring);
diff --git a/full/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java b/full/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java
index 439462a..aa2c71f 100644
--- a/full/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java
@@ -227,7 +227,7 @@
 
 
     @Test
-    public void testUserDataPointerFunction () {
+    public void testUserDataPointerFunction () throws KustvaktException {
         UserDetails details = new UserDetails(-1);
         Map<String, Object> m = new HashMap<>();
         m.put(Attributes.FIRSTNAME, "first");
@@ -324,7 +324,7 @@
 
 
     @Test
-    public void testUserdataRequiredFields () {
+    public void testUserdataRequiredFields () throws KustvaktException {
         UserDetails details = new UserDetails(-1);
         Map<String, Object> m = new HashMap<>();
         m.put(Attributes.FIRSTNAME, "first");
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktServerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktServerTest.java
index f6a1388..e62d410 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktServerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktServerTest.java
@@ -64,7 +64,7 @@
 
     @Test
     public void testRegisterBadPassword ()
-            throws URISyntaxException, ClientProtocolException, IOException {
+            throws URISyntaxException, ClientProtocolException, IOException, KustvaktException {
         HttpClient httpClient = HttpClients.createDefault();
 
         MultivaluedMap<String, String> map = new MultivaluedMapImpl();
@@ -102,7 +102,7 @@
 
     @Test
     public void testRegisterExistingUsername ()
-            throws URISyntaxException, ClientProtocolException, IOException {
+            throws URISyntaxException, ClientProtocolException, IOException, KustvaktException {
         HttpClient httpClient = HttpClients.createDefault();
 
         MultivaluedMap<String, String> map = new MultivaluedMapImpl();
@@ -139,7 +139,7 @@
 
     @Test
     public void testRegisterUser ()
-            throws URISyntaxException, ClientProtocolException, IOException {
+            throws URISyntaxException, ClientProtocolException, IOException, KustvaktException {
         HttpClient httpClient = HttpClients.createDefault();
 
         MultivaluedMap<String, String> map = new MultivaluedMapImpl();
