Application error reporting

Read this topic to understand how RESTful JSON web service provider applications can report errors to clients.

In top-down scenarios, it is likely that the application is required to report error conditions. For example, an error might be: Account Number not recognized. This requirement is unique to top-down scenarios; in bottom-up development the application either has an error reporting mechanism that is encoded in the data fields, or it abends. In the top-down scenario, the JSON schema is unlikely to define a field in which to report errors, so an alternative is needed.

For SOAP-based web services, this problem is addressed by using the EXEC CICS SOAPFAULT API. SOAP Fault messages do not exist in JSON. Instead, you can use the DFHHTTPSTATUS container to report application detected errors for JSON applications. For more information, see DFHHTTPSTATUS.
Note: Applications might also use the DFHRESPONSE container, and other control containers, to provide a more detailed error response, if they want to do so.