code: protected function prepareException(Exception $e)
      {
          $e = parent::prepareException($e);
  
          if($e instanceof PermissionDoesNotExist || $e instanceof AuthorizationException) {
              $e = new AuthenticationException($e->getMessage());
          }
  
          return $e;
      }
docs: Prepare exception for rendering.
  
  @param  \Exception  $e
  @return \Exception