Question

Throw custom error when performSubscribe api fails

  • 27 September 2021
  • 0 replies
  • 12 views

  1. While turning on zap, is it possible to throw custom error in zapier frontend and block the ‘on’ option.
    I am trying to throw custom error message to user (while turning the zap on) based on the error code from webhook response. When I use throw new z.errors.Error(‘error message’), it throws unhandled error. Here is the error stack:
     

Unhandled error: AppError: {"message":"Zapier integration has been disabled in :censored:14:bb599117af:. Kindly enable it and try again"}

AppError: {"message":"Zapier integration has been disabled in :censored:14:bb599117af:. Kindly enable it and try again"}

    at Object.<anonymous> (:censored:9:d1ba0cf2aa:/triggers/school_signup.js:54:21)

From previous event:

    at subscribeHook (:censored:9:d1ba0cf2aa:/triggers/school_signup.js:40:6)

    at execute (:censored:9:d1ba0cf2aa:/node_modules/zapier-platform-core/src/execute.js:72:12)

    at :censored:9:d1ba0cf2aa:/node_modules/zapier-platform-core/src/create-command-handler.js:29:14

    at Object.<anonymous> (:censored:9:d1ba0cf2aa:/node_modules/zapier-platform-core/src/middleware.js:90:22)

    at bound (domain.js:416:15)

    at Object.runBound (domain.js:427:12)

From previous event:

    at :censored:9:d1ba0cf2aa:/node_modules/zapier-platform-core/src/middleware.js:89:45

    at :censored:9:d1ba0cf2aa:/node_modules/zapier-platform-core/src/tools/create-lambda-handler.js:216:18

    at bound (domain.js:416:15)

    at runBound (domain.js:427:12)

    at processImmediate (internal/timers.js:464:21)

    at process.topLevelDomainCallback (domain.js:147:15)

    at process.callbackTrampoline (internal/async_hooks.js:129:24)

From previous event:

    at Domain.<anonymous> (:censored:9:d1ba0cf2aa:/node_modules/zapier-platform-core/src/tools/create-lambda-handler.js:201:10)

    at Domain.run (domain.js:373:15)

    at Runtime.handler (:censored:9:d1ba0cf2aa:/node_modules/zapier-platform-core/src/tools/create-lambda-handler.js:193:19)

    at Runtime.handleOnce (:censored:12:bb66ff632a:/Runtime.js:66:25)


0 replies

Be the first to reply!

Reply