By default, a REST tool ending with a response code of 4nn or 5nn (where n represents a numeric value) is handled as erroneous. A standard error dialog is displayed containing the error message sent by the REST tool. The action within which the tool is modelled is terminated. In this case, tools modelled in the action subsequent to the REST tool are not executed. If a tool returns a response code of 1nn or 3nn a warning dialog with the message sent by the REST tool is displayed at the end of the action. In this case, the action is not terminated.
The following modelling options can be used to catch exception handling when executing the model:
If you have modelled the Response Code output parameter for the REST tool, AWM interprets that as a requirement to handle the exception situation. The standard error dialog is not displayed and the action execution is not broken.
If you have modelled a Response Body for the REST tool, AWM checks for the Status Code attribute within the Response Body. If the response code of the REST tool matches with the Status Code specified in the Response Body, the standard error dialog is not displayed and the action execution is not broken.
If you decide to handle exceptional situations by modelling one or more Response Body relationships with different status codes, the JSON structure of the corresponding file descriptors must map with the returned JSON payload for the given status code.