set error to the field specified in unlock_keys config

please see discussion here - #2418