Hi There,
I was trying to write an app for an API using the Web editor (not CLI) and when I switch to code mode in the UI, it throws me the below error:
Authentication used: API key in header.
api is not defined What happened (You are seeing this because you are an admin): Executing triggers.new_transaction.operation.perform with bundle api is not defined Console logs: Stack trace: ReferenceError: api is not defined at eval
`new_transaction` is the name of my trigger.
Full stack trace:
Stack trace: ReferenceError: api is not defined at eval (eval at makeFunction (/var/task/node_modules/zapier-platform-core/src/tools/schema-tools.js:7:30), <anonymous>:8:50) at execute (/var/task/node_modules/zapier-platform-core/src/execute.js:78:12) at input (/var/task/node_modules/zapier-platform-core/src/create-command-handler.js:29:14) at Object.beforeMiddleware.then.newInput (/var/task/node_modules/zapier-platform-core/src/middleware.js:90:22) at bound (domain.js:402:14) at Object.runBound (domain.js:415:12) at Object.tryCatcher (/var/task/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/var/task/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/var/task/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/var/task/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/var/task/node_modules/bluebird/js/release/promise.js:699:18) at _drainQueueStep (/var/task/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/var/task/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/var/task/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues uas _onImmediate] (/var/task/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:705:18) at tryOnImmediate (timers.js:676:5) at processImmediate (timers.js:658:5) at process.topLevelDomainCallback (domain.js:126:23)
The exact same one works perfectly when using the form mode. (It does throw me the response must be array error, which is what I’m trying to fix in the code mode.)
I have tried my best to Google but with no luck. Any help will be appreciated.