fix error handling in hcapi, it's rsp.text instead of rsp.data