APIs & Integrations

ASavaliya
Participant

Invalid Request Error While Calling Contact search API

Hey All,

 

I am calling Hubspot contact search api of V3 from JAVA code and some time i get this response : 

{"status":"error","message":"There was a problem with the request.","correlationId":"dd10e787-148d-452f-b740-8cb786f37d41"}

 

but same request i call with Postman it work fine.

So what is the problem?

how to solve this problem?

 

Thank you

Ankur Savaliya

0 Upvotes
11 Replies 11
ASavaliya
Participant

Invalid Request Error While Calling Contact search API

Hi @dennisedson 

Any update on this?

0 Upvotes
ASavaliya
Participant

Invalid Request Error While Calling Contact search API

Hi @dennisedson 

There is no anything difference between failed requests VS successful requests.

Ang before one week this issue again happened, So is this due to HS change anything?

This time error response like this :

 {
"status": "error",
"message": "There was an error processing the request.",
"correlationId": "7f7cd745-51f3-4ebc-b2d0-61c356888a2b",
"category": "INTERNAL_ERROR"
}

Screenshot 2021-12-10 150959.png

 

Thanks

Ankur Savaliya

 

0 Upvotes
ASavaliya
Participant

Invalid Request Error While Calling Contact search API

@dennisedson Any update on this?

 

0 Upvotes
ASavaliya
Participant

Invalid Request Error While Calling Contact search API

Hi @zaklein @dennisedson 

 

Any update on this, I already add 5 second delay and still error raised. 

Can you suggest me soluation how to handle this?

 

Thank you 

Ankur Savaliya

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Invalid Request Error While Calling Contact search API

Can we see the code you are using? 

Is there anything different about the requests that return an error vs a successful request?

0 Upvotes
ASavaliya
Participant

Invalid Request Error While Calling Contact search API

Hi @zaklein @dennisedson 

I already have 5 second delay after calling new API but still getting error.

 

Thank you 

Ankur Savaliya

0 Upvotes
zaklein
Contributor | Diamond Partner
Contributor | Diamond Partner

Invalid Request Error While Calling Contact search API

Hi @ASavaliya , @dennisedson 

I have, on occasion, seen this kind of response when working with HubSpot APIs. In particular, I remember coming up against this when combining create/update record calls with CRM search calls in reasonably close succession. Generally, a retry call after a few seconds has worked fine for me in the past.

This is the most relevant existing solution I've been able to find on the Community Forum: https://community.hubspot.com/t5/APIs-Integrations/Error-quot-status-quot-quot-error-quot-quot-messa...

Knowing that you're already using retry logic, the only thing I can think to advise would be to try extending the period of time between error response and retry calls.

All the best,

Zach

ASavaliya
Participant

Invalid Request Error While Calling Contact search API

Hey @dennisedson 

Any Update On this, What is the root cause and how to prevent this. I am geeting this Error 20 to 30 time in day. i am also handling 5XX status code error and calling again same API after some time, but stil issue persist.

 

Thank you

Ankur Savaliya

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Invalid Request Error While Calling Contact search API

@zaklein , do you have thoughts on this?

0 Upvotes
ASavaliya
Participant

Invalid Request Error While Calling Contact search API

Hey @dennisedson 

I first call request from my code and get exception, so go Hubspot console API Log and get reqeust body from that and call that API from Postman and it work.

So what is main issue for this?

 

 

Thanks

Ankur Savaliya

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Invalid Request Error While Calling Contact search API

@ASavaliya 

How often are you receiving this error?  You can expect to occasionally receive errors so you will need to make sure your app is set up to handle this.

0 Upvotes