Error description not clear when syncing deal for a particular portal

When I’m syncing a deal for a particular portal I am facing an issue syncing the same to HS. In the errors endpoint, I see the below issue

{
“portalId”: XXXXXXX
“objectType”: “DEAL”,
“integratorObjectId”: “CHECKOUT:6568414085209”,
“changeOccurredTimestamp”: 1539898263000,
“errorTimestamp”: 1539898264285,
“type”: “UNKNOWN_ERROR”,
“details”: “Error performing[CREATE] DEAL[CHECKOUT:6568414085209] for portal 3919560, error was [3919560] create failed - java.util.concurrent.CompletionException: com.hubspot.apicaller.exceptions.ApiErrorResponseException: Api[name=deals, subPath=/deals/v2/deals/] Failed to process your request. Error code was ‘400’. Error message was:\nProperty values were not valid”,
“status”: “OPEN”
},

We are using the same source code to sync stuff to HS for the other portals too and the sync is fine with them.

Could you please elaborate on what are the exact values which are not valid and why aren’t they valid so that we can fix something on our side or let our client know to change something in the webhook being received?

@Llewellyn_Smith your help here would be much appreciated, Thanks.

Hi @Vamsivinay119,

I’ve been doing a bit of digging but have yet to uncover the cause.

Is there any way you have logs of the sync messages which caused these errors? I tried paging back through your app’s logs but am encountering an error after several pages.

I did find this more recent error via this endpoint, which may make it easier for you to locate the original sync message:

{
 "portalId": XXXXXXX,
 "objectType": "DEAL",
 "integratorObjectId": "CHECKOUT:6574994227289",
 "changeOccurredTimestamp": 1539972161000,
 "errorTimestamp": 1539972163765,
 "type": "UNKNOWN_ERROR",
 "details": "Error performing[CREATE] DEAL[CHECKOUT:6574994227289] for portal XXXXXXX, error was [XXXXXXX] create failed - java.util.concurrent.CompletionException: com.hubspot.apicaller.exceptions.ApiErrorResponseException: Api[name=deals, subPath=/deals/v2/deals/] Failed to process your request. Error code was '400'. Error message was:\nProperty values were not valid",
 "status": "OPEN"
}

I’m also seeing an INVALID_ASSOCIATION_PROPERTY error caused by a LINE_ITEM for that same portal:

{
 "portalId": XXXXXXX,
 "objectType": "LINE_ITEM",
 "integratorObjectId": "ORDERLINEITEM:1526285008985",
 "changeOccurredTimestamp": 1539972163000,
 "errorTimestamp": 1539972164216,
 "type": "INVALID_ASSOCIATION_PROPERTY",
 "details": "Sync settings SyncKey{objectType=LINE_ITEM, portalId=XXXXXXX, settingsId=792, externalObjectId=ORDERLINEITEM:1526285008985, toSyncMessageKey=SyncMessageKey{portalId=XXXXXXX, settingsId=792, externalObjectId=ORDERLINEITEM:1526285008985}}, invalid associations [SyncHadoopHubspotPropertyValue{hubspotPropertyName=hs_assoc__deal_id, propertyValue=CHECKOUT:6574994227289, timestamp=1539972163000}, SyncHadoopHubspotPropertyValue{hubspotPropertyName=hs_assoc__product_id, propertyValue=1416850210905, timestamp=153997",
 "status": "OPEN"
}

This is likely because the portal in question (ending in 9560) does not have a Sales Hub Professional subscription, which is required for line items. This is noted in the Line Items API documentation.

The other portals I checked which are successfully syncing deals from your app have Sales Hub Professional subscriptions, so I wonder whether the LINE_ITEM error is in turn preventing the deal from being created…

This topic has been resolved in direct message.

The error:

java.util.concurrent.CompletionException: com.hubspot.apicaller.exceptions.ApiErrorResponseException: Api[name=deals, subPath=/deals/v2/deals/] Failed to process your request. Error code was '400'. Error message was:\nProperty values were not valid

generally indicates that a property in a sync message was malformed, or that the value supplied was not one of the options for an enumeration property.

In this case, there were two deal properties sent in the sync message which did not have property options defined in the portal.

Finally, I want to clarify that Sales Hub Professional is not required for syncing line item objects through the Ecommerce Bridge.

Thanks @Isaac_Takushi for looking into the issue and also confirming that this is not related to Sales Hub Professional (which confused me earlier). I also conversed with @Llewellyn_Smith directly and the error messages will be added with the properties names too instead of just the error message.

Hi @Isaac_Takushi @Llewellyn_Smith Getting a different error in the sync-errors end point with no description. Could you please look into this?

DMed y’all the unmasked error.

{
“portalId”: XXXXXX,
“objectType”: “DEAL”,
“integratorObjectId”: “ORDER:XXXXXX”,
“changeOccurredTimestamp”: 1541608511000,
“errorTimestamp”: 1541608511710,
“type”: “UNKNOWN_ERROR”,
“details”: “Error performing[CREATE] DEAL[ORDER:XXXXXX] for portal XXXXXX, error was [XXXXXX] create failed - java.util.concurrent.CompletionException: com.hubspot.apicaller.exceptions.ApiErrorResponseException: Api[name=deals, subPath=/deals/v2/deals/] Failed to process your request. Error code was ‘400’. Error message was:\nProperty values were not valid”,
“status”: “OPEN”
},