correct name of error class
allow config to take a regex