title: How to make param required in NestJS?
body: <p>I would like to make my route <code>Query</code> parameter required.
  If it is missing I expect it to throw 404 HTTP error.</p>
  <pre class="lang-ts prettyprint-override"><code>@Controller('')
  export class AppController {
    constructor() {}
    @Get('/businessdata/messages')
    public async getAllMessages(
      @Query('startDate', ValidateDate) startDate: string,
      @Query('endDate', ValidateDate) endDate: string,
    ): Promise&lt;string&gt; {
     ...
    }
  }
  </code></pre>
  <p>I'm using <a href="https://docs.nestjs.com/pipes" rel="noreferrer">NestJs pipes</a> to determine if a parameter is valid, but not if it exists And I'm not sure that Pipes are made for that.</p>
  <p>So how can I check in NestJS if my param exists if not throw an error?</p>