ITADN

organizations list fails with 'missing field requireEmailVerification' on 3.4.2

#3304Openmindsupport 创建于 2026-05-19
BugWaiting for: Product Owner
M
mindsupportcommented
## Reproduction ``` $ sentry-cli --version sentry-cli 3.4.2 $ sentry-cli login --auth-token <USER_TOKEN_WITH_org:read> --global Stored token in ~/.sentryclirc $ sentry-cli info Sentry Server: https://sentry.io Default Organization: - Default Project: - Authentication Info: Method: Auth Token User: <redacted> Scopes: - event:read - org:read - project:read - project:releases $ sentry-cli organizations list error: could not parse JSON response Caused by: missing field `requireEmailVerification` at line 1 column 609 ``` ## Environment - sentry-cli 3.4.2 (latest, installed via `brew install getsentry/tools/sentry-cli`) - macOS Darwin 25.5.0 / arm64 - Sentry.io (SaaS, US region) - Token scopes: `event:read`, `org:read`, `project:read`, `project:releases` — sufficient per docs ## Debug trace With `SENTRY_LOG_LEVEL=debug`, the HTTP response from `GET /organizations/` is HTTP 200 with a valid JSON body. The body includes every field except `requireEmailVerification`: ```json [{ "id":"<id>", "slug":"<slug>", "status":{"id":"active","name":"active"}, "name":"<name>", "dateCreated":"2026-04-03T...", "isEarlyAdopter":false, "require2FA":false, "avatar":{...}, "allowMemberInvite":true, "allowMemberProjectCreation":false, "allowSuperuserAccess":true, "links":{ "organizationUrl":"https://<slug>.sentry.io", "regionUrl":"https://us.sentry.io" }, "hasAuthProvider":false }] ``` No `requireEmailVerification` key. The Sentry API doesn't currently emit one for this organization (a regular `us.sentry.io` Business-tier org with no SAML / no SCIM / no email-verification policy configured). ## Suspected fix Wherever the `Organization` struct is defined in `sentry-cli`, the `requireEmailVerification: bool` field needs `#[serde(default)]` (with a sensible default like `false`) so it deserializes cleanly when the API omits the field. This is the same pattern already used for several other optional Organization fields per the Sentry web/v0 API's evolution. Diff sketch (haven't grep'd the actual location): ```rust #[derive(Deserialize)] pub struct Organization { // ... #[serde(default)] pub require_email_verification: bool, // ... } ``` ## Impact `sentry-cli organizations list` is the canonical discovery command for new users — it's what surfaces "which orgs is my token authorized for" before they configure `~/.sentryclirc` defaults. Right now anyone setting up sentry-cli against an org without `requireEmailVerification` configured hits this error and has to find the org slug from the web UI URL instead. Operational commands (`issues list -o <slug>`, `events list`, `releases list`, `info`) work fine — the bug is isolated to the org-listing struct deserialization. ## Workaround Pull the org slug from the Sentry web UI (it's in the URL: `https://<slug>.sentry.io/...`) and use it as the `--org <slug>` flag on subsequent commands. 🤖 Reported during integration in [mavunabora](https://github.com/mindsupport/mavunabora) — a portfolio adopter of mind-dev-standards.
1 条评论