title: Custom Error handling in Express submodules (e.g. in Service Layer)
body: <p>I know about the Express documentation regarding Error handling, namely using next() to handle errors in async functions or throw to handle errors in sync functions. Throwing those from my route handler works fine, errors get passed to my custom errorHandler that I inserted via app.use().</p>
  <p>However, what I never found in any documentation is, how would I best handle errors in an async function (e.g. in my Service Layer) or class that is called by a Route handler. Do I pass next() to that function? I really don't want to do that, as I want to keep all Express specific functions separate from my other application logic.</p>
  <pre><code>class someClassThatIsUsedInMyRouteHandler {
      async create() {
          throw new CustomError(&quot;some message&quot;, 401);
      }
  }
  </code></pre>