Skip to content

Add try/catch to integrity-constraint-violation on update hook 8204

When copying authmap entries from "openid_connect_authmap" into the "authmap" db, it is possible to run into duplicate entries.

This commit adds a try/catch to the merge function and logs the error on "IntegretyConstrainViolationException".

By adding the try/catch inside of the foreach loop, we make sure that the update hook completes, while we skip and log the duplicate entries.

By doing this, we presume that duplicate entries is obsolete, and can safely be discarded in the update hook merge process.

Closes #3393143

Merge request reports

Loading