Following Automation REST Response documentation, we are able now to create a custom exception and return an appropiate http error code from our operations, as shown in the example below:
{
"entity-type": "exception",
"code": "org.nuxeo.ecm.automation.TraceException",
"status": 600,
"message": "Failed to invoke operation: Test.UpdateDocMetadata"
}
In this example 600 is our custom error code.
Now, we would like to be able to return a custom message in the exception. For example, instead of having "Failed to invoke operation: Test.UpdateDocMetadata operation", we would like to have a custom message. Is this posible?
We are using Nuxeo 7.2.
Thanks in advance and best regards,