Develop > Controller layer > Management Center Web application > Customize the Management Center Web application
Map of validation error reason codes
You can map error reason codes to Management Center objects for a more descriptive error response.
Before you begin
If a request cannot be processed because of business logic validation errors, the BOD response contains error information in the change status element in the Verb. The change status contains a reason code element that consists of a unique string representing the application error. In most cases, these unique reason codes correspond to a property of the Management Center object. By updating the validation error mapping, each Management Center object can associate reason codes with a particular property so that the error response to the Management Center can highlight the properties that cause the problem.To associate reason codes with a particular property of the Management Center object:
Procedure
- Open WebSphere Commerce Developer.
- Open one of the Management Center object definition files. Choose the file that describes the object with which you are working.
- In the validation error mapping section, identify the validation object element that contains the reason code mapping. If one does not exist, create a new validation object element for the Management Center object.
- Add a new ReasonCodeMapping for the service reason code and the property of the Management Center object with which it should be associated.
- Save the file.
- Restart the WebSphere Commerce Server and test the changes.
- Deploy the changes to the production environment.
Related tasks
Ovveride an existing validation error message
Related reference
Manage application errors and system exceptions