# Deserialization error

**URL:** <https://community.hubspot.com/t/deserialization-error/22791>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [July 13, 2020, 5:10pm UTC](https://community.hubspot.com/t/deserialization-error/22791 "2020-07-13T17:10:28Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![gfors](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gfors/32/43872_2.png) [@gfors](https://community.hubspot.com/u/gfors)\
**Post date:** [July 13, 2020, 5:10pm UTC](https://community.hubspot.com/t/deserialization-error/22791/1 "2020-07-13T17:10:28Z")

</div>

I was told to post here to hopefully get an answer from support. Hubspot gives me the infamous “Response deserialization error” without actually telling me why.

Hopefully someone can tell me why?

Here is a redacted json blob:

`{ "results": [{ "id": "3563b48d-582b-4cc7-b82d-287f93829b35", "title": "Some title", "authorId": 222, "authorName": "bobby mcbob", "accountId": 1111, "accountName": "Foo Bob", "noteType": "admin", "noteContentType": "text\/plain", "note": "malesuada dapibus nec viverra", "created": "2017-07-07T19:15:27+00:00", "tags": [], "accountAccessible": false, "appId": null, "appName": null, "starred": false, "updated": "2017-07-07T19:15:27+00:00", "updateAuthorId": null, "updateAuthorName": null, "associations": null, "isPartial": false }, { "id": "3563b48d-582b-4cc7-b82d-287f93829b35", "title": "Some title", "authorId": 222, "authorName": "bobby mcbob", "accountId": 1111, "accountName": "Foo Bob", "noteType": "admin", "noteContentType": "text\/plain", "note": "malesuada dapibus nec viverra", "created": "2017-07-07T19:15:27+00:00", "tags": [], "accountAccessible": false, "appId": null, "appName": null, "starred": false, "updated": "2017-07-07T19:15:27+00:00", "updateAuthorId": null, "updateAuthorName": null, "associations": null, "isPartial": false } ]}`

 ![29187iE960F81A2788AAEB.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/e/7e927cb697c50623b25dddae4c7f79d269fcd9a0.png)  
my properties

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [July 15, 2020, 2:38am UTC](https://community.hubspot.com/t/deserialization-error/22791/2 "2020-07-15T02:38:38Z")

</div>

Hey @gfors,

One thing that jumps out to me is that you’re using id instead of _ **objectId** _. As stated on this [documentation](https://legacydocs.hubspot.com/docs/methods/crm-extensions/crm-extensions-overview#sales-object-properties), the objectId is the unique ID for the crm object and it is a required property.

As such, could you try changing id to objectId and see if it works?

---

<div class="post-metadata">

**Author:** ![gfors](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gfors/32/43872_2.png) [@gfors](https://community.hubspot.com/u/gfors)\
**Post date:** [July 15, 2020, 5:29pm UTC](https://community.hubspot.com/t/deserialization-error/22791/3 "2020-07-15T17:29:38Z")

</div>

Added that, still no luck. Sure would be nice if the monitor returned a usable error response. Something missing? Something misformatted?

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [July 17, 2020, 5:22am UTC](https://community.hubspot.com/t/deserialization-error/22791/4 "2020-07-17T05:22:33Z")

</div>

Hey @gfors,

Thanks for the feedback! I agree that there’s opportunity for us to return a more targeted error message.

Digging further into this error, I’m assuming that it is for app 222414? If so, when I attempt to reach the GET url (the data fetch url) - [mgmt.dev.xxx.com/xxx/xxxx](http://mgmt.dev.xxx.com/xxx/xxxx), I’m seeing a 401 error. In this case, could your team ensure that HubSpot is able to reach the url so that we are able to populate the returned sales object?

---

<div class="post-metadata">

**Author:** ![gfors](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gfors/32/43872_2.png) [@gfors](https://community.hubspot.com/u/gfors)\
**Post date:** [July 17, 2020, 4:15pm UTC](https://community.hubspot.com/t/deserialization-error/22791/5 "2020-07-17T16:15:36Z")

</div>

Yes, that’s the app. Your monitor UI shows 200s. It’s not a public api so we are validating the signature from HS

---

<div class="post-metadata">

**Author:** ![gfors](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gfors/32/43872_2.png) [@gfors](https://community.hubspot.com/u/gfors)\
**Post date:** [July 21, 2020, 8:23pm UTC](https://community.hubspot.com/t/deserialization-error/22791/6 "2020-07-21T20:23:33Z")

</div>

Any news on this? Can I get this pushed to dev support?

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [July 22, 2020, 5:47am UTC](https://community.hubspot.com/t/deserialization-error/22791/7 "2020-07-22T05:47:01Z")

</div>

Hey @gfors,

I’m the dev support in HubSpot and I’d be happy to look further into this for you.

Upon digging, I was able to narrow down the issue in which I believe is the null value.

I change the null value to “” like this:

```auto
{objectId: 1,
 "title": "Some title",
 "authorId": 222,
 "authorName": "bobby mcbob",
 "accountId": 1111,
 "accountName": "Foo Bob",
 "noteType": "admin",
 "noteContentType": "text\/plain",
 "note": "malesuada dapibus nec viverra",
 "created": "2017-07-07T19:15:27+00:00",
 "tags": [],
 "accountAccessible": false,
 "appId": "",
 "appName": "",
 "starred": false,
 "updated": "2017-07-07T19:15:27+00:00",
 "updateAuthorId": "",
 "updateAuthorName": "",
 "associations": "",
 "isPartial": false};

```

and this shows up just fine on my crm card.

Could you try and see if this works for you?

---

<div class="post-metadata">

**Author:** ![gfors](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gfors/32/43872_2.png) [@gfors](https://community.hubspot.com/u/gfors)\
**Post date:** [July 22, 2020, 6:51pm UTC](https://community.hubspot.com/t/deserialization-error/22791/8 "2020-07-22T18:51:09Z")

</div>

I’ve overhauled the endpoint so results now contains just an array of:

```auto
 {
 "title": "Migration Config for something something",
 "authorName": "foo.bob",
 "noteType": "admin",
 "note": "\nmalesuada dapibus nec viverra",
 "created": "2017-07-07T19:15:27+00:00",
 "objectId": "3563b48d-582b-4cc7-b82d-287f93829b35"
 },
...

```

Made sure everything is a string (no nulls). Still failing after I deployed.

---

<div class="post-metadata">

**Author:** ![soul\_in\_code](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/soul_in_code/32/64369_2.png) [@soul\_in\_code](https://community.hubspot.com/u/soul_in_code)\
**Post date:** [July 22, 2020, 7:57pm UTC](https://community.hubspot.com/t/deserialization-error/22791/9 "2020-07-22T19:57:03Z")

</div>

Are you sure that you are passing in the correct object ID?

What I think is the objectID should always be recordID of the record and it should be integer instead of some random unique string.

Something like this should work, I guess.

```auto
 {
 "title": "Migration Config for something something",
 "authorName": "foo.bob",
 "noteType": "admin",
 "note": "\nmalesuada dapibus nec viverra",
 "created": "2017-07-07T19:15:27+00:00",
 "objectId": 35463
 },

```

---

<div class="post-metadata">

**Author:** ![gfors](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gfors/32/43872_2.png) [@gfors](https://community.hubspot.com/u/gfors)\
**Post date:** [July 22, 2020, 8:02pm UTC](https://community.hubspot.com/t/deserialization-error/22791/10 "2020-07-22T20:02:19Z")

</div>

Okay, finally found the issue. Apparently objectId has to be an integer.

Last bit I’m trying to fix is the datetime field, but at least that does not keep the note from displaying. It just says “Invalid property”.

---

<div class="post-metadata">

**Author:** ![soul\_in\_code](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/soul_in_code/32/64369_2.png) [@soul\_in\_code](https://community.hubspot.com/u/soul_in_code)\
**Post date:** [July 22, 2020, 8:05pm UTC](https://community.hubspot.com/t/deserialization-error/22791/11 "2020-07-22T20:05:13Z")

</div>

cool, glad I helped you out.

---

<div class="post-metadata">

**Author:** ![gfors](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gfors/32/43872_2.png) [@gfors](https://community.hubspot.com/u/gfors)\
**Post date:** [July 22, 2020, 8:06pm UTC](https://community.hubspot.com/t/deserialization-error/22791/12 "2020-07-22T20:06:38Z")

</div>

Wait… does objectId have to be the related object’s id? That seems silly since the api call is filtering by that… why would it be needed in the response? I was just inserting incrementing integers and it seems to work.

---

<div class="post-metadata">

**Author:** ![gfors](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gfors/32/43872_2.png) [@gfors](https://community.hubspot.com/u/gfors)\
**Post date:** [July 22, 2020, 8:29pm UTC](https://community.hubspot.com/t/deserialization-error/22791/13 "2020-07-22T20:29:52Z")

</div>

Well, I can’t seem to find the magical format expected by HS for date times, so I’m just going to change the card property to a string. :sigh:

---

<div class="post-metadata">

**Author:** ![gfors](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gfors/32/43872_2.png) [@gfors](https://community.hubspot.com/u/gfors)\
**Post date:** [July 24, 2020, 9:56pm UTC](https://community.hubspot.com/t/deserialization-error/22791/14 "2020-07-24T21:56:46Z")

</div>

Deployed my working-in-staging code to production.

Duplicated hubspot app & card.

Linked new app to production hubspot.

“Response deserialization error” :cryingblood:

I give up…for now.

---

<div class="post-metadata">

**Author:** ![soul\_in\_code](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/soul_in_code/32/64369_2.png) [@soul\_in\_code](https://community.hubspot.com/u/soul_in_code)\
**Post date:** [July 27, 2020, 7:49pm UTC](https://community.hubspot.com/t/deserialization-error/22791/15 "2020-07-27T19:49:57Z")

</div>

there could be some other issue which you may have missed.

---

<div class="post-metadata">

**Author:** ![gfors](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gfors/32/43872_2.png) [@gfors](https://community.hubspot.com/u/gfors)\
**Post date:** [July 27, 2020, 8:24pm UTC](https://community.hubspot.com/t/deserialization-error/22791/16 "2020-07-27T20:24:19Z")

</div>

Well, without help from someone who can actually check a real response against the system, it’s just me throwing darts blindfolded.
