Changing error to a lambda.