APIs & Integrations

DS44
Membro

Getting Connection reset for Hubspot contact Search API

resolver

For the Contact search API request we are getting the java.net.socketException connection reset exception. This occurs for half of the requests in production.  I am  using Spring rest Template to send the request. 

API: https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey={apiKey}
JSON request Body: 

{
"filters": [
{
"value": "testhubspoxtsd106@superops.ai",
"propertyName": "email",
"operator": "EQ"
}
],
"properties": [
"email"
],
"limit": 1,
"after": 0
}
error:
org.springframework.web.client.ResourceAccessException: I/O error on POST request for \"https://api.hubapi.com/crm/v3/objects/contacts/search\": Connection reset; nested exception is java.net.SocketException: Connection reset\n\tat org.springframework.web.client.RestTemplate.doExecute
0 Avaliação positiva
1 Solução aceita
himanshurauthan
Solução
Autoridade no assunto | Parceiro Elite
Autoridade no assunto | Parceiro Elite

Getting Connection reset for Hubspot contact Search API

resolver

Hello @Jaycee_Lewis and @DS44 

 

Generally, java.net.SocketException: Connection reset or HTTP 500 errors occur when the user fetches a large amount of data from the HubSpot account by the endpoint.

 

Maybe your search condition is matching a large number of data sets which in turn is throwing this error.

 

Regards,

Digital Marketing & Inbound Expert In Growth Hacking Technology

Exibir solução no post original

0 Avaliação positiva
3 Respostas 3
AndreyStroganov
Membro

Getting Connection reset for Hubspot contact Search API

resolver

it seems like HubSpot team just don't do anything about this issue for years. And I wonder why they always mark these kind of reports as "solved".

I have the same error few dozens time a day:

 

Error message: I/O error on POST request for "https://api.hubapi.com/communication-preferences/v3/subscribe": Connection reset; nested exception is java.net.SocketException: Connection reset
org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://api.hubapi.com/communication-preferences/v3/subscribe": Connection reset; nested exception is java.net.SocketException: Connection reset

Caused by: java.net.SocketException: Connection reset
    at java.base/java.net.SocketInputStream.read(SocketInputStream.java:186)
    at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
    at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:478)
    at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:472)
    at java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(SSLSocketInputRecord.java:70)
    at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1449)
    at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:1060)

 

 

0 Avaliação positiva
himanshurauthan
Solução
Autoridade no assunto | Parceiro Elite
Autoridade no assunto | Parceiro Elite

Getting Connection reset for Hubspot contact Search API

resolver

Hello @Jaycee_Lewis and @DS44 

 

Generally, java.net.SocketException: Connection reset or HTTP 500 errors occur when the user fetches a large amount of data from the HubSpot account by the endpoint.

 

Maybe your search condition is matching a large number of data sets which in turn is throwing this error.

 

Regards,

Digital Marketing & Inbound Expert In Growth Hacking Technology
0 Avaliação positiva
Jaycee_Lewis
Gerente da Comunidade
Gerente da Comunidade

Getting Connection reset for Hubspot contact Search API

resolver

Hi, @DS44 👋 Hey, @himanshurauthan do you have any tips you can share on how your team has handled similar issues in the past? Thanks for taking a look! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Avaliação positiva