Skip to content

Global Middleware not respecting next() #355

@jamesfmac

Description

@jamesfmac

Description

Applying global middleware via app.use seems to pass control to the next part of the chain before next() is called.

Example:

module.exports = function(app) {
  app.use(function(payload, user){
    console.log('This comment should print and then timeout')
  })
  app.command("/pilot", slashCommand);
};

This should fail however control seems to pass correctly to the command. What am I missing?

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugM-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions