I have no idea, I wanted to prevent an error due to the fact I call it outside the classic express workflow. I think it should be okay but that it can be improved by removing the parameter because this middleware is the last in the execution stack. Therefore next shouldn't be used. What do you think?