From 0707747940700cb4ce7fa18a698483f636a44ae9 Mon Sep 17 00:00:00 2001 From: Geert Josten Date: Tue, 7 Jul 2015 17:49:52 +0200 Subject: [PATCH] Fixed #162: invoke REST error-handler for all REST exceptions --- src/roxy/error.xqy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/roxy/error.xqy b/src/roxy/error.xqy index 197abad5..bf5c0765 100644 --- a/src/roxy/error.xqy +++ b/src/roxy/error.xqy @@ -144,7 +144,7 @@ declare function local:error($title as xs:string?, $heading, $msg) }; -if ($ex/error:code = "RESTAPI-EXTNERR") then +if (fn:starts-with($ex/error:code, "REST")) then xdmp:invoke( "/MarkLogic/rest-api/error-handler.xqy", (xs:QName("error:errors"), $error:errors)