none
Unique Index Unhandled Exception (non SuperUser vs SuperUser) RRS feed

  • Question

  • I have applied a unique index to the Name attribute on an entity. When I try to add a new member as a SuperUser with a duplicate Name value I get an informative error message that there is a unique index on that attribute. However, when I try to add a new member as a non SuperUser, I get an unhandled exception error.

    The first two log entries for a SuperUser and a non SuperUser are identical.  It's after the second log entry that the non SuperUser start the change to an unhandled exception.

    The key to the third log entry for the non SuperUser is the following call - "Failed to ExecuteNonQuery on query mdm.udpIndexGet".

    After the third log entry, there are two more log entries of Error and then a final log entry of Critical.

    Why is the SuperUser getting a descriptive error message from the system where a non SuperUser just gets an unhandled exception?

    Tuesday, June 25, 2019 6:23 PM

Answers

  • Ok - figured out the answer.

    There is an unhandled exception when a call to mdm.udpIndexGet is called and the user is not listed in the mdm.viw_SYSTEM_SECURITY_USER_INDEX view.  Because there is an INNER JOIN in the mdm.udpIndexGet proc to the mdm.viw_SYSTEM_SECURITY_USER_INDEX view and the user doesn't exist in the view, no rows are returned from the proc resulting in an unhandled exception.

    A simple change to the proc to make the join an OUTER JOIN and move the User_ID filter out of the WHERE clause and make it part of the OUTER JOIN fixes the issue.

    Not sure how to report this as a potential defect, but definitely seems as though this should be classified as a defect.

    Wednesday, June 26, 2019 1:42 PM