Symptoms
Suppose the following scenario: you are using the endpoint Web Service broker. In an error case the service delivers an appropriate error message which is then not being displayed in the UI even though you are using an error condition and the error rule on the form.
Diagnoses
When an error occurs on a View on a Form, the error handler will attempt to handle it via the View’s error handling and then revert to the Form's error handling if nothing was found. In case no error handling being specified at all, default error handling will apply.
The following order is used when searching for error handlers on error conditions (depending on the origin):
1. Search for a valid error handler in the rule
2. Then search for a valid error handler in the View
3. Then search for a valid error handler in the Form
4. Then apply the default error handling if nothing was found on the previous levels
In case of aforementioned scenario it may be the case that on the main form you have a view rule that executes a SMO method over an endpoint web service broker and then the sub-form is opened in this rule. After this the method which causes the error is called and all this happens from the embedded view and not from the opened sub-form.
In such case you need to move all the program logic from the sub-form call to the sub-form itself.
Resolution
You should keep in mind error handling precedence and placement described above when designing your own error handling (Rule, View, Form, Default).