xdmp:get-request-error-format() as xs:string
Returns the current error format for the request. The error format's default value is configured in the App Server. It may be overwritten in the rewriter. The return value is one "xml" , "html" , "json" or "compatible".
xdmp:get-request-error-format() => "json"