Add a custom key-error for registry objects