handleAsyncError(handler) {
    return (req, res, next) => {
      Promise.resolve()
        .then(() => handler(req, res, next))
        .catch(err => {
          if (err.name === 'SequelizeDatabaseError' && err.message.includes('value too long')) {
            next(new E422(err.message));
          } else if (err.name === 'SequelizeDatabaseError') {
            next(new Error(err.message + '\n' + err.stack));
          } else {
            next(err);
          }
        });
    };
  }
@param {import('express-serve-static-core').RequestHandler} handler
@return {import('express-serve-static-core').RequestHandler}