I'm making an authenticated http request in a topic.
Everything works ok until I try to save the response in a variable in that topic.
I receive:
Sorry, something went wrong. Error code: SystemError. Conversation ID: ce34135e-948c-45c3-a52c-27c83f107c7b. Time (UTC): 4/19/2024 1:05:17 PM.
It's very important to note that this http request does not error as I've confirmed by saving the error status code in a variable and selecting continue on error and noting that the status code does not get output in a subsequent message.
I've tried saving the http response as "any" (so it doesn't get parsed to anything, I guess) but the simple act of attempting to save the response brings up this SystemError.
If I do not save the http response in a variable, I do not get a SystemError
tl;dr - microsoft bug
I've resolved this problem.
The server I was communicating with was:
1. Always returning gzipped content, regardless of accept-encoding in my HttpRequest header (bummer)
2. Was also returning the correct content-encoding header of gzip in it's response headers
Microsoft Copilot is failing to obey the content-encoding header on the response.
I determined this by spinning up a local server with a tunnel that acted as a proxy to my target server except my local server did not compress it's responses, and copilot was able to communicate with this local proxy server and save and surface the response without a problem.
no, this changes nothing.
I just hardcoded a known valid bearer token into the topic and copied the exact response from postman that is returned from the service using that bearer token and I receive the same error with the same SystemError displayed in the copilot widget and the same exception returned from the server:
"'0x1F' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0. (UserErrorCode: SystemError, ReasonCode: Undefined)"
Hi @adamboosted
Attempt using the "From Sample Data" type. Hopefully, this approach will prove effective.
If my response has addressed your query, kindly mark your post as Solved.
If you found my response helpful or it provided you with a direction to proceed, please give it a Thumbs Up. Your Kudos are appreciated. You can accept multiple posts as solutions.
If you're still encountering any issues or challenges, please don't hesitate to inform me so I can assist you further. I'm here to help.
Cheers ,
Umesh Khandelwal
More digging, the error message in the stack trace is similar to this one: https://github.com/FirelyTeam/firely-net-sdk/issues/1876
Not sure if there's a compression issue somehow
And finally the headers of the response (I noticed it does not include status code, it's unclear how to debug httprequests gone wrong even)
{
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "*",
"Alt-Svc": "h3=\u0022:443\u0022; ma=2592000",
"Date": "Fri, 19 Apr 2024 15:48:20 GMT",
"Strict-Transport-Security": "max-age=15724800; includeSubDomains; preload",
"Transfer-Encoding": "chunked",
"Vary": "Accept-Encoding",
"Via": "1.1 google",
"X-Request-ID": "73f3b676-c82a-4283-8583-ef3fd510ad85",
"x-response-time-ms": "171"
}
Stack trace from the browser, if this is helpful at all