Return an error from middlware and handlers. Panic if the error is not resolved before reaching the router.