Hi Raja, Are you suggesting I create a resource extension instead and use fn:errorr() as described on that page ? If so, then yes, I believe that would be one solution.
However, I'm curious to see if there's a way to do custom error handling for the standard GET/v1/documents call. The doc at https://docs.marklogic.com/8.0/REST/GET/v1/documents doesn't seem to mention any way to do so. Regards, Danny On Wed, Jul 8, 2015 at 7:52 AM, <[email protected]> wrote: > Hi Danny , > > > > Did u check the below mentioned section in the REST API [extensions] > document . > > > > https://docs.marklogic.com/guide/rest-dev/extensions#id_33892 > > > > > > thanks and regards > > Raja >>> > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Danny Sinang > *Sent:* Wednesday, July 08, 2015 4:26 PM > *To:* general > *Subject:* [MarkLogic Dev General] Custom Error Handling for REST API call > > > > Is there a way to make the ML REST API on ML 8 do custom error handling ? > > > > Right now, when we issue a request like this (for a non-existent document) > : > > > > GET /v1/documents/?uri=/1211/20/14/IC12112014.xml > > > > We get a long (15 to 20-line) error message that starts off like this : > > > > *RESTAPI-NODOCUMENT*: (err:FOER0000) Resource or document does not exist: > category: content message: /1211/20/14/IC12112014.xml > > ... > > > > I'm hoping I could just replace the error message with a custom one-liner. > > > > Regards, > > Danny > > > > > > This e-mail and any files transmitted with it are for the sole use of > the intended recipient(s) and may contain confidential and privileged > information. If you are not the intended recipient(s), please reply to the > sender and destroy all copies of the original message. Any unauthorized > review, use, disclosure, dissemination, forwarding, printing or copying of > this email, and/or any action taken in reliance on the contents of this > e-mail is strictly prohibited and may be unlawful. Where permitted by > applicable law, this e-mail and other e-mail communications sent to and > from Cognizant e-mail addresses may be monitored. > > _______________________________________________ > General mailing list > [email protected] > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general > >
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
