Skip to content

Commit

Permalink
fix: Org auth token logic (#1768)
Browse files Browse the repository at this point in the history
  • Loading branch information
loewenheim committed Oct 4, 2023
1 parent 1c487cd commit 3bda8a2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,7 @@ impl TokenData {
.decode(encoded.as_bytes())
.context("invalid base64 data")?;

let json =
serde_json::from_slice::<serde_json::Value>(&json).context("Failed to decode JSON")?;

if matches!(json.get("url"), Some(serde_json::Value::Null) | None) {
bail!("Org auth token is missing a URL. Please make sure that `system.url-prefix` is set in your Sentry config.yml.");
}

serde_json::from_value(json).context("Failed to decode org auth token")
Ok(serde_json::from_slice(&json)?)
}
}

Expand Down

0 comments on commit 3bda8a2

Please sign in to comment.