fix: treat 403 from self-client as operational error#11805
Conversation
Co-Authored-By: Stilla <stilla@stilla.ai>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
OpenAPI ChangesNo changes detected in the OpenAPI schema. |
Yopi
left a comment
There was a problem hiding this comment.
Since we know the token is valid, the 403s comes from the user not having access
|
Don't you fear this will hide real error/mistakes in the future? For example, if we miss a team owner change, we might try to do stuff on behalf of the wrong member? |
|
Preview Environment |
Hmm. That's a good point. I was thinking that it would only be when someone tries to access something they don't have access to legitimately. I'd like to get rid of false positives in alerts somehow though |
Problem
A
403response from the Polar self-client (e.g.,polar.portal.list_payment_methods) was raisingPolarSelfClientError— a non-retryable client error — causing Sentry alerts as unexpected failures.Fix
Add
403to thePolarSelfClientOperationalErrorcondition in_raise_error. A 403 can occur transiently (e.g., during customer session setup race conditions) and should be treated as an operational error, not a programming/client error.Fixes Sentry issue: SERVER-4M0
Sent by @Yopi from Operational error fix.