lib/plugins/aws/deploy/compile/events/apiGateway/lib/methods.js/hasPassThroughRequest
    const hasPassThroughRequest = (event) => {
      const requestPassThroughBehaviors = [
        'NEVER', 'WHEN_NO_MATCH', 'WHEN_NO_TEMPLATES',
      ];

      if (event.http.request && Boolean(event.http.request.passThrough) === true) {
        if (requestPassThroughBehaviors.indexOf(event.http.request.passThrough) === -1) {
          const errorMessage = [
            'Request passThrough "',
            event.http.request.passThrough,
            '" is not one of ',
            requestPassThroughBehaviors.join(', '),
          ].join('');

          throw new this.serverless.classes.Error(errorMessage);
        }

        return true;
      }

      return false;
    };