fix processResponse error handling