La fonction de suggestion automatique permet d'affiner rapidement votre recherche en suggérant des correspondances possibles au fur et à mesure de la frappe.
Bug (?): CRM extension action hook does not display message when HTTP status is 500
I would like to display a meaningful error message to the user after executing an action hook. According to the documentation, "HubSpot will attempt to parse responses to action hooks as JSON and look for a message property. HubSpot will display this message to the user on either success or failure." however it doesn't look like this is happening. When inspecting the console, the result is marked as error, the message is present, however only the default error message is displayed:
{
"status":"error",
"message":"Invoice # 923A6AFA-0001 has been paid already!",
"correlationId":"22c9bd48-7004-4ff3-a9b1-8297be0e438f",
"requestId":"21f5967881256939fb47cee9d8942b12"
}
Do you happen to have an example in an account that I can reproduce this with? If I can reproduce, I can take this to my team and we can take a closer look. A Hub ID and an object ID that I can test with should be more than enough to get started.
I created a simple AWS Lambda function to show the issue, you can test it inside my account, HubID: 6033501, Object ID: 3251, there is a card called Test CRM Card (please ignore other cards) with two actions:
Success action returns a message with statusCode 200, which works.
Error action returns a message with statusCode 500, but the message is ignored and a generic message is displayed.
You beat me to the punch! Apologies for not keeping this thread up-to-date. If you run into issues going forward, please don't hesitate to reach back out!