[MarkLogic Dev General] fn:error

Kapoor, Pragya PKapoor1 at innodata.com
Mon Mar 30 04:24:47 PDT 2015


Hi,


I am using fn:error as :


if($e//error:code/text() eq "XDMP-LEXVAL") then
    fn:error(xs:QName("ERROR"), "Incorrect Data Entered in Search Query")
else ()

I get a response as :

<error-info>
    <code>500</code>
    <error-type>server</error-type>
    <message>Internal Server Error | ERROR - Incorrect Data Entered in Search Query</message>
    <description>Incorrect Data Entered in Search Query (ERROR): in /rest-apis/search/search-document.xqy at line number 616</description>
</error-info>?

In my response error code is 500. I need to change the code to some other no say 510.
How can I achieve this?

Thanks
Pragya
?



"This e-mail and any attachments transmitted with it are for the sole use of the intended recipient(s) and may contain confidential , proprietary or privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this e-mail or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20150330/07c80649/attachment.html 


More information about the General mailing list