Catching Errors in Factory Method with express.js
First of all, by default ExpressJS does not support async routes. To solve that you can use express-async-errors plugin. Just add the following at the beginning of the file:
import 'express-async-errors'

Now ExpressJS will await promises and handle promise rejections. Then you can create custom errors handler:
export function handleApiErrors(): (err: unknown, req: Request, resp: Response, next: NextFunction) =&gt; unknown {
    return (err, _req, resp, next) =&gt; {
        if (err) {
          console.error(String(err))
          return resp.status(500).json({
              error: 'unknown error',
          })
        }
        next(err)
    }
}

Then include custom error handler just before app.listen:
app.use(handleApiErrors())


Now each route can return a promise and rejected promises will be returned as 500 response. You can also include http-errors to further improve error handling.

You can check the live example on torrent-stream-server

Other observations
null return
login has Promise&lt;User&gt; type, but you return null. If you don't get typescript error, you should consider enabling strictNullChecks option.
res.end and res.json
You mix res.json with res.end. Maybe some middleware handles, that res.end would return JSON. Or maybe you just return plain text response on error? In any case, it's confusing, so you should always use res.json() (you can chain it with end if you like, but I don't see a reason).
No spaces
I see that you don't like spaces. But it's hard to read with that style. You should at least add spaces after :. You should find a styleguide you like and follow it. Or you can just use prettier