"message": "Call to a member function canNot() on null", "exception": "Symfony\\Component\\Debug\\Exception\\FatalThrowableError",

The error message "Call to a member function canNot() on null" indicates that you are trying to call the canNot() method on a null object. This means that the object you are trying to call the method on is not instantiated or has not been assigned a value. To fix this error, you need to make sure that the object is properly initialized before calling the canNot() method. Check if the object is null and handle the null case appropriately before calling the method.