wrap http_get and handle errors