zapier / zapier-platform

The SDK for you to build an integration on Zapier
https://platform.zapier.com
Other
344 stars 188 forks source link

`skipThrowForStatus` overrides oauth2 `autoRefresh` #404

Open sillypirate opened 3 years ago

sillypirate commented 3 years ago

Bug Description

Whenever you have skipThrowForStatus: true, it supersedes the autoRefresh: true option in oauth2 setup, forcing developers to include a z.errors.RefreshAuthError() in their afterResponse middleware that autoRefresh: true should be handling.

Reproduction Steps

Set both skipThrowForStatus and autoRefresh to true. The autoRefresh will be ignored.

Version Info

zapzap commented 3 years ago

This issue has been copied into our private issue tracker (as PDE-2624). Thanks for the report! We'll update this as we learn more.

xavdid commented 3 years ago

Thanks @sillypirate! definitely seems like a bug; I'll take a look.