By default any database error that is encountered when a record is edited will be notified to the user using the message generated by the database. In many cases this message is unfriendly and may not explain the cause of the error. You can use the events
onRecordInsertError and
onRecordUpdatetError to handle any errors encountered when editing the record and substitute a more meaningful message. In this sample try adding a new category with a duplicate category name to trigger the event handler.