APIs & Integrations

durchanek
Participant

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"
}

Screen Shot 2019-08-27 at 11.55.58.png

0 Votes
5 Réponses
Derek_Gervais
Ancien salarié HubSpot
Ancien salarié HubSpot

Bug (?): CRM extension action hook does not display message when HTTP status is 500

Hey @durchanek ,

 

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.

0 Votes
durchanek
Participant

Bug (?): CRM extension action hook does not display message when HTTP status is 500

Hi @Derek_Gervais ,

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.

Best,

Ladislav

 

0 Votes
durchanek
Participant

Bug (?): CRM extension action hook does not display message when HTTP status is 500

Looks like this have been solved Smiley heureux

Derek_Gervais
Ancien salarié HubSpot
Ancien salarié HubSpot

Bug (?): CRM extension action hook does not display message when HTTP status is 500

Hey @durchanek ,

 

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!

0 Votes
durchanek
Participant

Bug (?): CRM extension action hook does not display message when HTTP status is 500

Hey @Derek_Gervais ,

sorry, not at the moment because the app is running from my local dev mechine. But I will setup a simple proof of concept and will let you know!

 

Best,

Ladislav

0 Votes