Hi everyone!👋
About the app: Canvas Power App using a Custom connector for executing the post API method.
Problem:
I'm getting a random error on different days using mobile data (in desktop and wifi works fine now also the error was detected on desktop with wifi).
Aleatory error 'JSON.stringify cannot serialize cyclic structures'.
The error was on trying to call the API (Executing the API post method) it failures random on different days only with mobile data.
I'm not using any JSON Functions or stringify explicit on the code. Maybe, Powerapps convert or use JSON.stringify internally for sending the information to the custom connector, but not syre.
Some details: pseudo-code
UpdateContext(
{
locResponse: CustomConn.PostMethod(
"application/json",
gblApiKey,
{
user: User().Email,
account: First(colInformation).account,
guid: GUID(),
submissionGUID: gblSubmissionGUID,
accountkey: First(colInformation).accountKey,
flag: If (CountRows(colInformationSelected)=0,false,true),
listString1: If (CountRows(colInformationSelected)=0,"",Concat(colInformationSelected,Text(key),Char(59))),
lastname: First(colInformation).lastname,
listString2: If (CountRows(colAdditionalInformationSelected)=0,"",Concat(colAdditionalInformationSelected,Text(key),Char(59))),
address: First(colInformation).address
}
)
}
);
- The collections with CONCAT where very simple (Key/Text) with 0 or 5 records.
Do you have some similar errors? Or any thoughts?🤔
Or if someone has an idea about what is happening, it would be really great.
Thanks in advance
Best Regards,
Facu
Finally, I got the root cause of the error, it was a coding error. The App was trying to send on one parameter the whole control " [object Object] " instead of the Text.
At future, It will be better to show a user-friendly error instead of the JSON.Stringify ones. Because Stringify is a component inside of PowerApps.
Hope it would helps other people.
Thanks
More related information. I added IfError, here are the details:
WarrenBelz
109
Most Valuable Professional
Michael E. Gernaey
82
Super User 2025 Season 1
MS.Ragavendar
72