Web Request failed: TypeError: source.no is not a function

It seems like a web request that worked until yesterday. Stopped working after the most resent Appfarm upgrade. Devtools logs show the following message: “TypeError: source.no is not a function”. I am not able to log anything to console from the result parser, so it seems the error occurs before the result parser is reached. I have tried to set up the same webrequest in postman, there it works without any issue. Here is a slightly redacted version of the response from Postman:

{“message”: “Successfully created object”,“_links”: {“get”: {“href”: "https://dk.in4mo.net…}}}

I have tried to ask the appfarm AI what may cause this issue. Here is part of the response:

”Based on the error TypeError: source.no is not a function and your description that the result parser isn’t being executed, this is likely happening before Appfarm even gets to the result parser stage. The error suggests Appfarm is trying to process the response and encountering something it interprets as a function call.

The issue is almost certainly related to the _links object structure in your API response. Here’s what’s likely happening:

Appfarm’s internal processing might be trying to access properties in a way that conflicts with the structure. The error source.no suggests it’s looking for a .no property somewhere and trying to call it as a function.”

The appfarm AI also suggest changing the response type from JSON to Text, which is not an option in the web request component.

Could this be caused by a change made in the most resent version of appfarm?

Hi! Which version of Appfarm are you on, and is the web request run in an app action or a service action?

Thanks for the quick reply, I am on version 132-0-17

Same here! Lots of functions stopped working after this update

Hi!

@Kjellamund do you have any example of a function that is not working after this update?

Eksempel:
var tags = [];

if (frivilligPantstillelseOver100kEierBolig) {

tags.push("frivilligPantstillelseOver100kEierBolig");

}

if (inkassoEierBolig) {

tags.push("inkassoEierBolig");

}

return tags.map(t => `“${t}”`).join(", ");

Great, thanks.

What type of properties are frivilligPantstillelseOver100kEierBolig and inkassoEierBolig? Are these normal boolean properties or something else?

Normal booleans:

Hi! Where in the web request is this function used? Is it for a form body item?

Form data - body content

1 Like

A fix has been released in version 132-0-18.