properly handling error for hook filter:privileges.posts.filter