'use strict';

module.exports = () => {
  return async function amqplibHandler(ctx, next) {
    try {
      // console.log('经过中间件');
      await next();
      // console.log('结束中间件');
    } catch (err) {
      await ctx.service.dingTalk.push(err && err.message);
      ctx.logger.error(err);
    }
  };
};
