title: I am passing a argument in express next(argument) so that express middleware function will catch it but why is it also going through app.all("*")))
body: <pre><code>app.use(Router)
  </code></pre>
  <p>//in route handler here i am passing the <strong>next(err)</strong>,why the app.all middleware is running, shoudn't the control go directly into express errror handling middleware skipping app.all//</p>
  <pre><code>app.all(&quot;*&quot;,(req,res,next)=&gt;{
      console.log(&quot;app middleware ran&quot;)
      next(err)
  })
  app.use((err,req,res,next)=&gt;{
    
  res.status(400).send(err)
  })```
  </code></pre>