Add error-handler option that takes a request