Tagged version cannot access imported source despite all troubleshooting

I am encountering a persistent error in my tagged build: ‘Cannot convert undefined or null to object’ at the line where I call getSource(“OauthAPI”). this is a simple restAPI and I imported under my TypeScript 2. I have already checked all the usual causes: verified the source name, re-imported and re-tagged after changes, ensured the source is present in the Sources tab at tag time, checked the Resources tab for the tag, tried renaming the source and updating code/config, and checked for scope and duplicate imports. The error only occurs in the tagged version, not in Live. The source is present and enabled for export at tag time. Is there any advanced troubleshooting or platform-level issue that could cause this? Any help or escalation path would be appreciated.

I’m not totally sure what you’re doing from your description, but if you’re trying to make an external API call from a TypeScript function, that won’t work, as the function can’t make such calls.

For that I think you need to first set up a Webhook, that you then call via a step in the Action, which would pass the results into your function. That’s certainly what we’ve done.