Hi I’m trying to trigger an api call from a button click within our smart plug but I get this response shown below. I appreciate any guidance you can give.
[Error] Failed to load resource: the server responded with a status of 424 () (extension_proxy, line 0)
[Log] SSP: Error (378597564270154, line 94)
[Log] SSP: (378597564270154, line 95)
responseJSON: {hlErrorMessage: “Looks like your request triggered circuit breaker.…st end-point is up and then retry after sometime.”}
Hi @Adam_McLean, I could somehow try to help. But I have little context about “smart plug” that you are referring to. Can you please help me understand it?
I’ve written a custom smart plug which on load hits our endpoint. The endpoint supplies some pre-formatted html. Once displayed a clickable button, once clicked, hits a different endpoint to update our DB.
The second call is the one that fails and is the one I supplied I the code snippet.
How does your first API call happen? Does it happen form the frontend? I assume this because preformatted html which contains button will be displayed to app user. Is my assumption true?
Hi @Saif thanks for the quick response.
Just to clarify the endpoints are not attached to freshchat. The smart plug is completely front end, it’s a JS widget for the support agents view and appears on the right hand side of the screen.
I updated the script through the settings-> smart plugs.
Hi @Adam_McLean, I was able to refer to it. Let me see if I can get some help from Freshchat product team to get you the help that you need. Please allow me some time.
I realised what the issue was. A white spaced value i.e ‘fun times’ rather than ‘fun-times’ had been passed through.
Once correct everything is working as expected.
Thank you for sharing the solution as well @Adam_McLean. It will always help developers within community trying to solve similar problem. We will also work towards to share accurate answer sooner.