How to throw exception in published rest microflow
How can I deliberately throw an error in the microflow published as a rest service. In the microflow xml input is parsed to non persistable entities based on a xsd schema. When parsing the xml fails, I need the rest service to throw either a http 500 exception or a custom exception. In the software consuming the rest service, I cannot use the httpresponse body or headers.
Thomas van IJzendoorn
The community commons has a java action ThrowWebserviceException. May be you could use this.
There is a built in java action for that throwRestServiceException.
It can be used safely inside webservices operations as well, so that you can apply the same error handling in both implementations