[Bug]: throwing new z.errors.RefreshAuthError()
doesn't retry performUnsubscribe
#664
Labels
bug
Something isn't working
Bug Description
In a hook-based trigger, when
new z.errors.RefreshAuthError()
is thrown duringperformUnsubscribe
because an OAuth2 access token has expired,refreshAccessToken
is called, butperformUnsubscribe
doesn't run again. As a result, my API never receives the unsubscribe message.Reproduction Steps
Here are traces from my OpenTelemetry instrumentation:
In this trace, here's what I did:
subscribe
@ 02:26:50)z.errors.RefreshAuthError()
(02:31:41)refreshAccessToken
then re-rantestAccess
- at this point, it's clear thatautoRefresh: true
works for connection testingz.errors.RefreshAuthError()
(02:38:17)refreshAccessToken
againZapier Platform version
14.1.1
Node.js version
18.13.0
Your Operating System
Linux Ubuntu 22.04 in WSL
npm/yarn version
3.5.1
App ID
185407
More Details
I can remove authorization checking based on the access token from my unsubscribe endpoint if this is the expected behaviour. I think all I'd need to do is add some sort of shared secret in the subscribeData that I echo back when unsubscribing.
The text was updated successfully, but these errors were encountered: