Skip to content

Bump API schema to 23e0c5a2#17032

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

Bump API schema to 23e0c5a2#17032
getsantry[bot] wants to merge 1 commit intomasterfrom
bot/bump-api-schema-to-23e0c5a2

Conversation

@getsantry
Copy link
Contributor

@getsantry getsantry bot commented Mar 18, 2026

No description provided.

@vercel
Copy link

vercel bot commented Mar 18, 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 18, 2026 6:19pm
sentry-docs Ready Ready Preview, Comment Mar 18, 2026 6:19pm

Request Review

// SENTRY_API_SCHEMA_SHA is used in the sentry-docs GHA workflow in getsentry/sentry-api-schema.
// 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 = '23e0c5a2ca214d4bdd363dce8539839160fd8d04';
Copy link

Choose a reason for hiding this comment

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

Bug: The build may crash if an API endpoint in the new schema uses a tag that is not defined in the top-level tags array, leading to an uncaught TypeError.
Severity: MEDIUM

Suggested Fix

Before attempting to push to categoryMap[tag].apis, add a check to verify that categoryMap[tag] is not undefined. If the tag does not exist in the map, you should log a warning and skip it to prevent the build from crashing due to malformed schema data.

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#L11

Potential issue: In the `apiCategoriesUncached` function, the code iterates through tags
associated with an API endpoint (`apiData.tags`) and uses each tag to access a
`categoryMap`. However, it does not verify that the tag exists as a key in `categoryMap`
before attempting to access its properties. If the new OpenAPI schema, referenced by the
updated SHA, contains an endpoint with a tag that is not defined in the top-level
`data.tags` array, `categoryMap[tag]` will be `undefined`. The subsequent attempt to
access `.apis.push()` on this `undefined` value will throw a `TypeError`, causing the
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