error refactor and allow aborting a request before calling the request listener