Skip to content

Commit

Permalink
fix: downcast to tokenserver's actual error type (#1596)
Browse files Browse the repository at this point in the history
which its handlers (except hearbeat) return vs ApiError

otherwise we fail to take ReportableError::is_sentry_event into
account and flood sentry with all errors

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

This reverts commit 1443b31.

- update quinn-proto per RUSTSEC-2024-0373

Issue SYNC-4262
  • Loading branch information
pjenvey authored Sep 12, 2024
1 parent 1443b31 commit 2b8b1f5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
18 changes: 12 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion syncserver/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ macro_rules! build_app_without_syncstorage {
// Middleware is applied LIFO
// These will wrap all outbound responses with matching status codes.
.wrap(ErrorHandlers::new().handler(StatusCode::NOT_FOUND, ApiError::render_404))
.wrap(SentryWrapper::<ApiError>::new(
.wrap(SentryWrapper::<tokenserver_common::TokenserverError>::new(
$metrics.clone(),
"api_error".to_owned(),
))
Expand Down
4 changes: 1 addition & 3 deletions tokenserver-auth/src/oauth/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ def verify_token(self, token):
# Serialize the data to make it easier to parse in Rust
return json.dumps(token_data)
except (ClientError, TrustError):
# XXX: debugging
#return None
raise
return None

0 comments on commit 2b8b1f5

Please sign in to comment.