Use a real enum as middleware handler return type

as said in #38