Data action timeout - weird behavior on simple http get

hi all;

something strange is happening with data actions; it’s not the usual timeout; it’s… off. we’re on zoom contact center.

the symptom is this: a simple http get to a zoom api endpoint times out, but not consistently. sometimes it’s fine, sometimes it’s not. it seems correlated to concurrent calls. the target endpoint is /api/v2/users/me; just getting the current user. nothing fancy.

the data action itself is basic. it just sets a variable with the response body. no json path mapping; nothing. it’s basically doing jack all; just a http get.

the timeout is configured as 10 seconds. it’s failing within that time. like, 3-5 seconds. the error message is just the standard “data action execution timed out”. not helpful; obviously.

i’ve been looking at the logs. the zoom contact center platform logs show the request going out, but there’s no corresponding response log entry when it fails. it’s like the response never comes back to the platform. if the request succeeds, i see the whole flow in the logs; request, response, data action variable set.

here’s the pseudo-code for what the data action looks like:

function execute(context) {
 http.get("/api/v2/users/me", {
 headers: {
 "authorization": "bearer " + context.user.token;
 }
 })
 .then(response => {
 context.response = response.body;
 })
 .catch(error => {
 console.error("error getting user:", error);
 context.response = "error";
 });
}

it’s not a token issue; i’ve confirmed that; the token is valid. the same token works fine when i test it outside of the data action, using postman.

i’ve tried increasing the timeout to 30 seconds; it doesn’t change anything. still fails intermittently. i’ve also tried adding retry logic within the data action, like this:

function execute(context) {
 let attempts = 0;
 const maxAttempts = 3;

 const attemptGet = () => {
 attempts++;
 http.get("/api/v2/users/me", {
 headers: {
 "authorization": "bearer " + context.user.token;
 }
 })
 .then(response => {
 context.response = response.body;
 })
 .catch(error => {
 console.error("attempt", attempts, "error:", error);
 if (attempts < maxAttempts) {
 //wait 1 sec
 setTimeout(attemptGet, 1000);
 } else {
 context.response = "error";
 }
 });
 };

 attemptGet();
}

that helps a little; reduces the failure rate; but doesn’t eliminate it. it feels like we’re masking the problem; not solving it.

it feels like there’s something happening at the zoom contact center platform level; maybe some throttling or connection pooling issue; but i can’t prove it. the zoom api documentation doesn’t mention any rate limits on /api/v2/users/me; it’s a get request; shouldn’t be hammering it that hard.

any thoughts?

It’s the scoring, maybe? We’ve seen similar timeouts when the data action’s sentiment calibration is off - the API rejects it. Just a hunch, but it’s worth checking.

Try adding a header - it’s very sensitive.

headers:
 Authorization: "Bearer YOUR_TOKEN"
 Content-Type: "application/json"

Is the endpoint rate-limited? I recall a discussion about that in the SIP trunk thread.

1 Like