Skip to content

Bump API schema to 856d8a93#17000

Open
getsantry[bot] wants to merge 1 commit intomasterfrom
bot/bump-api-schema-to-856d8a93
Open

Bump API schema to 856d8a93#17000
getsantry[bot] wants to merge 1 commit intomasterfrom
bot/bump-api-schema-to-856d8a93

Conversation

@getsantry
Copy link
Contributor

@getsantry getsantry bot commented Mar 17, 2026

No description provided.

@vercel
Copy link

vercel bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Mar 17, 2026 8:07pm
sentry-docs Ready Ready Preview, Comment Mar 17, 2026 8:07pm

Request Review

// DO NOT change variable name unless you change it in the sentry-docs GHA workflow in getsentry/sentry-api-schema.
const SENTRY_API_SCHEMA_SHA = 'd218ebe064fe5ec8cb383688e80cbf36c0a6a5e8';
const SENTRY_API_SCHEMA_SHA = '856d8a930d4078c5c8bff64da8121d34a14176af';

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The code does not validate the structure of the fetched OpenAPI schema. A structural change in the new schema, introduced by this PR's SHA update, could cause a build crash.
Severity: MEDIUM

Suggested Fix

Before accessing nested properties on the fetched schema data, add checks to ensure they exist. For example, before calling data.tags.forEach(...), verify that data.tags is a defined array. Wrap the schema processing logic in a try-catch block to handle parsing or structural errors gracefully and prevent build failures.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/build/resolveOpenAPI.ts#L12

Potential issue: The function `apiCategoriesUncached` processes an OpenAPI schema
fetched from an external source. The code directly accesses nested properties like
`data.tags` and `apiData.tags` and calls `.forEach` on them without first verifying
their existence. The pull request updates the commit SHA used to fetch this schema. If
the new version of the schema at this SHA has a different structure, for instance, if
the `tags` property is missing or renamed, the code will attempt to call `.forEach` on
`undefined`. This will throw a `TypeError`, causing the application's build process to
crash.

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants