def permission_denied(
        cls, permission: Union[BasePermission, AsyncBasePermission]
    ) -> None:
        """
        This method is called when the permission check fails. By default, it raises an exception.
        Adapt this method to your needs if you need to raise different exceptions depending on the permission type.
        """
        message = getattr(permission, "message", None)
        raise PermissionDenied(message)

        This method is called when the permission check fails. By default, it raises an exception.
        Adapt this method to your needs if you need to raise different exceptions depending on the permission type.
        
ninja_extra/controllers/base.py