Names the middleware function

Provides better debug tracebacks
Merge pull request #24 from eric-wieser/patch-1

Names the middleware function