title: Laravel Lighthouse: CanDirective: How to define a custom error message?
body: <p>I have created a custom policy for a model and the policy logic works really well with a GraphQL mutation. I'm just wondering can I somehow pass my custom error message as a GraphQL response?</p>
  <p>This is an example of a policy class:</p>
  <pre class="lang-php prettyprint-override"><code>use App\Models\MyModel;
  use App\Models\User;
  use Illuminate\Auth\Access\HandlesAuthorization;
  
  class MyModelPolicy
  {
      use HandlesAuthorization;
      
      public function update(User $user, MyModel $my_object)
      {
          if (!$my_object-&gt;checkSomething()) {
              // Throws an exception
              $this-&gt;deny('My custom error message should be delivered to the GraphQL client..');
          }
          
          return true;
      }
  }
  </code></pre>
  <p>But the message in the exception gets discarded:</p>
  <ul>
  <li>by Laravel 5 here: <a href="https://github.com/illuminate/auth/blob/8f0603a1d5b90c045a1ce5365ead0f0ba20fc6ce/Access/Gate.php#L279-L281" rel="nofollow noreferrer">https://github.com/illuminate/auth/blob/8f0603a1d5b90c045a1ce5365ead0f0ba20fc6ce/Access/Gate.php#L279-L281</a></li>
  <li>or by Laravel 6 (and onward) here: <a href="https://github.com/illuminate/auth/blob/478cf31f02831ec45194fec5428f666f85b4f1b0/Access/Gate.php#L277" rel="nofollow noreferrer">https://github.com/illuminate/auth/blob/478cf31f02831ec45194fec5428f666f85b4f1b0/Access/Gate.php#L277</a></li>
  </ul>