retry http api call if error without valid json occurs