APIs & Integrations

lbkulinski
Teilnehmer/-in

Java exception/error included in API response

lösung

Hello

 

I've been using HubSpot's custom objects API (https://api.hubspot.com/crm/v3/objects/{fullyQualifiedName}) and ran into an interesting response that contained a Java exception/error. I am using PHP with curl to interact with the API.  The response is as follows:

{
  "status": "error",
  "message": "Invalid input JSON on line 1, column 370: Cannot deserialize value of type `java.lang.String` from Object value (token `JsonToken.START_OBJECT`)",
  "correlationId": "_redacted_"
}

 

I was able to correct the error on my end, but thought this was a confusing response. I thought I would make you aware of it.

 

Thanks

0 Upvotes
1 Akzeptierte Lösung
dennisedson
Lösung
HubSpot-Produktteam
HubSpot-Produktteam

Java exception/error included in API response

lösung

@lbkulinski 

Thanks for pointing this out!  Will report to the team to make the messaging more useful!

Lösung in ursprünglichem Beitrag anzeigen

0 Upvotes
4 Antworten
dennisedson
Lösung
HubSpot-Produktteam
HubSpot-Produktteam

Java exception/error included in API response

lösung

@lbkulinski 

Thanks for pointing this out!  Will report to the team to make the messaging more useful!

0 Upvotes
lbkulinski
Teilnehmer/-in

Java exception/error included in API response

lösung

No problem! As a Java afficionado I was able to deduce the error, but just thought I'd share. Thank you!

EDash
Teilnehmer/-in

Java exception/error included in API response

lösung

Could you please share more information on how you resolved the error? I am getting this same (confusing) error in my PHP with curl attempt to use: https://api.hubapi.com/crm/v3/objects/contacts

 

I am baffled as to what is the problem. I have looked through documentation and this forum, but have not found anything that helps to resolve this issue yet. Thanks for any insights!

 

 

0 Upvotes
EDash
Teilnehmer/-in

Java exception/error included in API response

lösung

Nevermind ... I figured it out. The JSON is simply different in API v3.

0 Upvotes