Fix error on API calls returning empty body.