title: Express next() is triggering next route which is parameterised after next() from current route is called
body: <p>I have this route, <code>/test</code> which I called but somehow it is triggering <code>/:async</code> route as well when next() is called in <code>/test</code> route's finally?</p>
  
  <pre><code>router.post('/test/:value?'async (req, res: express.Response, next: express.NextFunction) =&gt; {|
     try{
       //code
     }catch(err){
       //log error
     }finally{
       next();
     }
  })
  
  router.post('/:id?'async (req, res: express.Response, next: express.NextFunction) =&gt; {
     try{
       //code
     }catch(err){
       //log error
     }finally{
       next();
     }
  })
  </code></pre>
  
  <p>I have this <code>finalResponseHandler</code> middleware in server.ts file which is supposed to be called on next().</p>
  
  <pre><code>app.use(finalResponseHandler);
  </code></pre>
  
  <p>If I remove <code>/:id?</code> route <code>finalResponseHandler</code> middleware is called perfectly.<br>
  Why is this /:id route is getting called instead of finalResponseHandler middleware?<br>
  How do I correct this to not call <code>/:id</code> route when calling '/test' route.</p>
  
  <p>Any help is appreciated.</p>