allow errors to be dynamic