<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using fetch() instead of requests library in custom action? in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Using-fetch-instead-of-requests-library-in-custom-action/m-p/517550#M48186</link>
    <description>&lt;P&gt;I'm getting an "unhandled promise rejection" error in my workflow's custom JS action, and I cannot fathom why. As far as I can tell, there is no "promise" returned, as the fetch call happens inside another function which converts the result into JSON, that then gets parsed and passed out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error description is massive, which suggests to me that I've stumbled across some problem deep in Hubspot's environment. I've cribbed most of the code from the example supplied by the API I'm trying to consume and feed into Hubspot. Is there a "correct way" to use fetch in a custom action, or do I have to abandon the API's example fetch-using code and build something myself using requests instead?&lt;/P&gt;</description>
    <pubDate>Thu, 28 Oct 2021 17:51:32 GMT</pubDate>
    <dc:creator>MMartin78</dc:creator>
    <dc:date>2021-10-28T17:51:32Z</dc:date>
  </channel>
</rss>

