Nitpick: But isnt the $entity the expected here? And as such the first argument (usually for the error message to make sense).