cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
223
Views
0
Helpful
4
Replies

Debugging gadgets.io.makeRequest() with HTTP 504 response

Phill Johntony
Level 1
Level 1

I have a PCCE Finesse 12.6(2) gadget calling a 3rd party API with the `gadgets.io.makeRequest()` function that is getting an HTTP 504 Gateway Timeout response about 50% of the time. To be clear, the POST https://FINESSE/gadgets/makeRequest is getting a 200 OK response that contains a body of:

throw 1;<don 't be evil'>{
    "https://API/call/transfer": {
        "rc": 504,
        "body": "",
        "DataHash": "6uj2b760o7de56d7gpi8jnvgnk"
    }
}

The 3rd party API is not seeing these requests on their end, but our networking team is seeing the request traverse the firewall. What's even stranger is that the gadget is getting this 504 response immediately, I would expect it would take at least 5-10 seconds to get a gateway timeout response.

I've tried looking through Finesse logs to gain insight but I can't find anything relevant.

Are there any debug logs I need to enable that can help me troubleshoot this?

4 Replies 4

Good idea @bill.king1, except that wouldn't line up with the fact that they can see the request traversing the firewall.

Regardless of that, I tried this gadget source whitelist in the lab and it causes a different issue when enabled and not in the allowed list. The makeRequest itself gets a HTTP 400 response instead of a 200 OK (with 504 in the body) when the URL is not whitelisted.

Thanks for the suggestion though.

When you say it works 50% of the time, have you tried to isolate it to one Finesse server vs. the other for instance? Like is it that it always works for one user and not the other, or totally random where if you try it few times in a row from the same user, it intermittently works/doesn't?

We've been making updates to this gadget in dev, so we've only been trying from a single user where it will work on one call, then hang up/try again and it fails on the next. We've only been trying from our primary Finesse server so far.