zapier / zapier-platform

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

[Bug]: Failed session refresh returns empty error message #880

Open the-csaba opened 1 week ago

the-csaba commented 1 week ago

Bug Description

If in Session Authentication, the test endpoint returns a 401 error, but the authentication endpoint is performing just fine, then there is no error message:

374393027-83d8be42-3765-4348-8b87-6062e0b64420

This makes it especially hard to support the WooCommerce integration because of its distributed nature. What happens is that we are not aware of the problem until the customer contacts us, and they don't receive error details which could help troubleshoot the problem themselves.

Reproduction Steps

Needs a misconfigured target system that accepts authentication but fails with a 401 error during test call.

Zapier Platform version

15.7.3

Node.js version

N/A

Your Operating System

N/A

npm/yarn version

N/A

App ID

67372

More Details

This is the official WooCommerce integration.

The missing error message is due to the fact that the RefreshAuthError is thrown without any messages.

https://github.com/zapier/zapier-platform/blob/a70b71604bb1065137b97bfe9e0d3340819428e4/packages/core/src/http-middlewares/after/throw-for-stale-auth.js#L10