APIs & Integrations

PaulRaph
Member

Why does batch associations read throw errors when no associations are found?

SOLVE

Hi, we are creating an integration for a client and are using the Associations Batch Read to get Companies associated with a batch of deals.

 

/crm/v3/associations/:fromObjectType/:toObjectType/batch/read

 

First question

Why does this endpoint return an error when no associations are found? 

 
"status""error",
"category""OBJECT_NOT_FOUND",
"subCategory""crm.associations.NO_ASSOCIATIONS_FOUND"
 
From my point of view, this is not an error. It should return a simple empty result.
 
----------------
Second Question:
If I include 10 object ids in my request and none of them contain that specific association, this call returns 10 errors (1 for each object).
 
Does this count as 10 errors or just 1? (That would give me 10 errors for a single call and bring my error ratio to a very high number).
 
----------------
Third Question:
It is unclear in the documentation if the error ratio applies to every API consumers or only for App developpers. Does this apply if I'm a simple API consummer? Also, if this is the case, how can I query my error ratio?
0 Upvotes
1 Accepted solution
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Why does batch associations read throw errors when no associations are found?

SOLVE

hi @PaulRaph 

Sorry for delayed response,

1.  That is a good call out.  I will add this feedback for our engineers to review (no promises on timeline)

2.  Also a good question.  We generally are looking at the HTTP request error when counting so 1 call with 10 "errors" would = 1 error

3.  It is only for App Developers who are trying to get certified to join the marketplace.  It is not a black/white rule, rather a part of a set of criteria that is used for quality assurance.

 

Thanks!

 

View solution in original post

0 Upvotes
2 Replies 2
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Why does batch associations read throw errors when no associations are found?

SOLVE

hi @PaulRaph 

Sorry for delayed response,

1.  That is a good call out.  I will add this feedback for our engineers to review (no promises on timeline)

2.  Also a good question.  We generally are looking at the HTTP request error when counting so 1 call with 10 "errors" would = 1 error

3.  It is only for App Developers who are trying to get certified to join the marketplace.  It is not a black/white rule, rather a part of a set of criteria that is used for quality assurance.

 

Thanks!

 

0 Upvotes
PaulRaph
Member

Why does batch associations read throw errors when no associations are found?

SOLVE

Hi Dennis, thanks a lot for your answers, this is very valuable information and I think some of those answers could be included in the documentation!

 

Thanks again for your time!

 

Paul Raphaël

0 Upvotes