|
Hi Pragya,
500 response code is coming from MarkLogic predefined error utility file where all response code has been defined as per specific message or standards. You need to change that configuration file manually but its not recommended at all.
You can create your own custom xml file with your custom codes and messages. While throwing the respective error you can return your own customize response.
Regards,
Asit Nautiyal
From: [email protected] [[email protected]] on behalf of Kapoor, Pragya [[email protected]]
Sent: Monday, March 30, 2015 4:54 PM To: MarkLogic Developer Discussion Subject: [MarkLogic Dev General] fn:error 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
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. ---------------------------------------------------------------------------------------------------------------------------------------------------- |
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
