trycatch middleware wrapper so middleware can't kill your server