mozilla-services / syncstorage-rs

Sync Storage server in Rust
Mozilla Public License 2.0
979 stars 49 forks source link

feat: debug "Invalid OAuth token" (verifier returns None) error cases #1595

Closed pjenvey closed 1 month ago

pjenvey commented 2 months ago

temporarily switch it to a "pyo3 error" so it's logged

Issue SYNC-4363

We're getting a lot of "Invalid OAuth token" errors in sentry on both stage and prod w/ 0.17.x -- I don't understand what's causing them so hopefully this helps show the underlying cause.

This should switch these errors from "Invalid OAuth token" to "pyo3 error", with an accompanying Python traceback emitted to the logs that wasn't previously emitted for this error -- with it returning None the underlying error was ate/ignored.

The aim of this change is to gain more verbose logging of this issue on stage. I don't plan on rolling this change out to prod for now (hopefully the feedback from stage leads to a solution with an accompanying rollback of this change)