I am attempting to write a custom function for the source of a Connector to hit the following endpoint: https://restorationone.mapwebserver10.com/api/restorationoneapi/GetTerritoryChanges?skip=0&take=30
I am getting the following error locally when tetsing with Deno: Fetch TypeError: error sending request for url: error trying to connect: Connection reset by peer (os error 54)
And the following error when running the Connector in the Yext platform:
ERROR: Fetch TypeError: error sending request for url: error trying to connect: tls handshake eof at async mainFetch (ext:deno_fetch/26_fetch.js:276:12) at async fetch (ext:deno_fetch/26_fetch.js:500:7) at async getTerritories (LocationCityZipPlugin:src/mod.ts:64:24) at async invoke (plugin-host:worker/worker.ts:108:20) at async self.onmessage (plugin-host:worker/worker.ts:34:22)
Some brief google searching leads me to believe this could be an issue with Deno?
The endpoint returns results when viewed in the browser and postman. Also if I use “Pull from API” as a source of the connector I can get the request to work, with a request URL of “https://restorationone.mapwebserver10.com/api/restorationoneapi/GetTerritoryChanges”, and Pagination Control = Offset, with Offset Key = “skip”, Offset start value = “0”, Limit Key = “take” and Limit Value = “30” and Total Items Key = “Total Owned”
Have you encountered this issue before? If not, could you explain how the Pull from API request is working under the hood? Perhaps there is something I need to include in my function that can make the request work?