# Bypassing corrupted record

**URL:** <https://community.hubspot.com/t/bypassing-corrupted-record/93430>\
**Category:** APIs & Integrations\
**Tags:** starter\
**Created:** [November 7, 2023, 7:23am UTC](https://community.hubspot.com/t/bypassing-corrupted-record/93430 "2023-11-07T07:23:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phi1](https://avatars.discourse-cdn.com/v4/letter/p/eb8c5e/32.png) [@Phi1](https://community.hubspot.com/u/Phi1)\
**Post date:** [November 7, 2023, 7:23am UTC](https://community.hubspot.com/t/bypassing-corrupted-record/93430/1 "2023-11-07T07:23:24Z")

</div>

Hi community,

While making Get requests to retrieve contacts data from HubSpot, the script fails after retrieving few records. Following error message is thrown:

InvalidURL: Failed to parse: [https://api.hubapi.com{'after](https://api.hubapi.com%7B%27after/)’: ‘70602’, ‘link’: ‘[https://api.hubapi.com/crm/v3/objects/contacts?after=70602](https://api.hubapi.com/crm/v3/objects/contacts?after=70602)’}

which indicates that a particular record is corrupted.

I want to bypass the reord (70602) and retrieve other contants records from the hubspot. How can I achieve this?

Any help/direction would be highly appreciated.

Thank you

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [November 8, 2023, 5:57pm UTC](https://community.hubspot.com/t/bypassing-corrupted-record/93430/2 "2023-11-08T17:57:33Z")

</div>

Hi there, @Phi1! Thanks for your question. I have a question and request:

- What language are you using? Is it Python in this case?
- Can you share an example request and response along with the error body, please?

Thank you for the additional information! — Jaycee

---

<div class="post-metadata">

**Author:** ![Phi1](https://avatars.discourse-cdn.com/v4/letter/p/eb8c5e/32.png) [@Phi1](https://community.hubspot.com/u/Phi1)\
**Post date:** [November 9, 2023, 5:44am UTC](https://community.hubspot.com/t/bypassing-corrupted-record/93430/3 "2023-11-09T05:44:59Z")

</div>

Hi Jaycee,

Thank you for getting back. I am using Python.

Luckily I managed to sort out the issue. The reason why my call always failed was due to the limit imposed by HubSpot in getting records. I sorted this issue by running a loop and making calls with Limits set to 100. Doing so helped me with my issue.

However one issue I ran into now is that certain fields from Contacts object are not retrievable. For example I wanted to extract OriginalSource information by passing the properties tag as shown below

properties = “phone,company,country,originalsource,contactowner”

endpoint = f"[https://api.hubapi.com/crm/v3/objects/contacts?properties={properties}](https://api.hubapi.com/crm/v3/objects/contacts?properties=%7Bproperties%7D)"

However it fails to retrieve originalsource information. I tried using original%20source format as well. Could you help me with this please?

Many thanks
