The Snippet block is throwing an INVALID_FUNCTION error on GetRESTProxy and I can’t figure out why. The syntax looks identical to the examples in the docs. I’m trying to hit an internal endpoint to grab some queue stats. The endpoint works fine in Postman. It returns JSON. But the script fails immediately upon execution.
Here is the assignment:
var proxy = GetRESTProxy();
var response = proxy.Get("https://internal-api.company.com/stats");
ASSIGN result = response.Body;
The error log just says INVALID_FUNCTION for the GetRESTProxy line. No other details. I’ve checked the spelling. It’s case sensitive but I have it right. I tried calling it without arguments too. Same result. I even tried assigning it to a string first. Nothing.
The Studio environment is up to date. I’m running this in a standard flow. The function should be available. It’s listed in the reference guide. But the engine doesn’t recognize it. Or maybe it does but fails to instantiate. I don’t know.
I’ve restarted the session. I’ve cleared the cache. I’ve checked the permissions on the flow. Everything seems fine. Other functions like ASSIGN and IF work perfectly. It’s just this proxy object that’s broken.
Is there a specific initialization step I’m missing? The docs don’t mention one. They just show the call. Maybe it’s a bug in the current build. Or maybe I need to enable some feature flag. I don’t see any settings for that in the admin UI.
I’m stuck on this. It’s blocking the whole workflow. I need to get this data into the flow context. Any ideas on what triggers this specific error? I’ve searched the forum but found nothing recent. Old threads suggest it was fixed years ago. So why is it happening now?
I’ll keep trying different variations. But I’m out of guesses. The function name is correct. The capitalization is correct. The parentheses are correct. Yet it fails. Every. Single. Time.