Skip to content

Bump API schema to 96182d4d#16971

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

Bump API schema to 96182d4d#16971
getsantry[bot] wants to merge 1 commit intomasterfrom
bot/bump-api-schema-to-96182d4d

Conversation

@getsantry
Copy link
Contributor

@getsantry getsantry bot commented Mar 16, 2026

No description provided.

@vercel
Copy link

vercel bot commented Mar 16, 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 16, 2026 10:17pm
sentry-docs Ready Ready Preview, Comment Mar 16, 2026 10:17pm

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 = '96182d4dac8cb361c5215c4eb17af5554224b977';
Copy link

Choose a reason for hiding this comment

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

Bug: Accessing categoryMap[tag] without checking if tag exists can cause a build crash. An endpoint with a tag not defined in the top-level tags array will trigger a TypeError.
Severity: HIGH

Suggested Fix

Before the line categoryMap[tag].apis.push({...}), add a check to verify that categoryMap[tag] is not undefined. If the tag does not exist, you could log a warning and skip it, or throw a more descriptive error to prevent the build from crashing.

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 `resolveOpenAPI.ts`, the code populates a `categoryMap` from the
top-level `tags` array of an OpenAPI schema. It then processes each API endpoint and,
for each `tag` associated with an endpoint, it attempts to push the API details into
`categoryMap[tag].apis`. However, there is no check to verify that `tag` exists as a key
in `categoryMap`. If an API endpoint uses a tag that is not defined in the top-level
`tags` array, `categoryMap[tag]` will be `undefined`, causing a `TypeError` when
`.apis.push()` is called. This will crash the entire build process.

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