RefreshAuthError is unhandled

  • 25 August 2020
  • 3 replies

Userlevel 1

Whenever I try to throw RefreshAuthError, it shows it is unhandled instead of calling the refreshAccessToken. 

This is the error stack


Unhandled error: RefreshAuthError: 

What happened:

  Starting POST request to {url}

  Received 400 code from {url} after 1956ms

  Received content "






     "message":"Invalid Oauthtoken"



    at afterResponse (/zapier/sample/index.js:16:15)

    at Object.collector.then (/zapier/sample/node_modules/zapier-platform-core/src/middleware.js:80:37)

    at bound (domain.js:395:14)

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

    at Object.tryCatcher (Documents/zapier/sample/node_modules/bluebird/js/release/util.js:16:23)

    at Promise._settlePromiseFromHandler (/zapier/sample/node_modules/bluebird/js/release/promise.js:547:31)

    at Promise._settlePromise (/zapier/sample/node_modules/bluebird/js/release/promise.js:604:18)

    at Promise._settlePromise0 (/zapier/sample/node_modules/bluebird/js/release/promise.js:649:10)

    at Promise._settlePromises (/zapier/sample/node_modules/bluebird/js/release/promise.js:729:18)

    at _drainQueueStep (/zapier/sample/node_modules/bluebird/js/release/async.js:93:12)

    at _drainQueue (/zapier/sample/node_modules/bluebird/js/release/async.js:86:9)

    at Async._drainQueues (/zapier/sample/node_modules/bluebird/js/release/async.js:102:5)

    at Immediate.Async.drainQueues [as _onImmediate] (/zapier/sample/node_modules/bluebird/js/release/async.js:15:14)

    at runCallback (timers.js:705:18)

    at tryOnImmediate (timers.js:676:5)

    at processImmediate (timers.js:658:5)

    at process.topLevelDomainCallback (domain.js:120:23)

    1) should create an object

3 replies

Userlevel 3
Badge +4

What platform are you using to build this...CLI or Visual Builder?  What is the Authentication method required (OAuth, Token, Basic)?  Can you provide a snippet of your code to look at?



Userlevel 7
Badge +10

Hi @yttest!

I wanted to check in with you on this one, since we didn't hear back after that last message. Did you still need help here or were you able to resolve things? Please let us know :)

heya, I'm also having this issue @yttest  did you find a solution for this? 

I'm using the CLI for Oauth2 

just calling a      

throw new z.errors.RefreshAuthError();

and expecting it to be handled on zapiers end by calling the refreshAccessToken in the oauth2Config provided in the index. Just double checking my understanding is correct :)