title: how to stop middleware chain?
body: <p>How can I properly end a middleware chain in case of error ?</p>
  
  <p>In my code I have </p>
  
  <pre><code>    if (someProblem) {
          res.status(statuscode).json({message: 'oops'});
          return;
      }
  </code></pre>
  
  <p>Yet the midleware in the chain after that keeps getting called giving me the <code>Can't set headers after they are sent</code>error.</p>