Skip to content

Bump API schema to ea4cef1e#16943

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

Bump API schema to ea4cef1e#16943
getsantry[bot] wants to merge 1 commit intomasterfrom
bot/bump-api-schema-to-ea4cef1e

Conversation

@getsantry
Copy link
Contributor

@getsantry getsantry bot commented Mar 13, 2026

No description provided.

@vercel
Copy link

vercel bot commented Mar 13, 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 13, 2026 9:57pm
sentry-docs Ready Ready Preview, Comment Mar 13, 2026 9:57pm

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 = '163c5962e920fc2df12610f98e4376722843222e';
const SENTRY_API_SCHEMA_SHA = 'ea4cef1e8603b04dd7e97f80bbedfbdb86566a2c';
Copy link

Choose a reason for hiding this comment

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

Bug: The schema fetch in resolveOpenAPI lacks HTTP status checks, which can cause the build to crash on non-200 responses like 404s by trying to parse HTML.
Severity: MEDIUM

Suggested Fix

Before calling response.json(), add a check to ensure the fetch was successful, for example by verifying response.ok. If the response is not okay, throw an informative error to prevent the JSON parsing attempt and provide a clear reason for the build failure.

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: The `resolveOpenAPI` function fetches an OpenAPI schema from a raw
GitHub URL. It does not check the HTTP response status before attempting to parse the
body as JSON. If the fetch operation results in a non-200 response (e.g., a 404 if the
SHA becomes invalid or a 5xx error from GitHub), the code will try to parse an HTML
error page as JSON, causing the build process to crash with a syntax error. This makes
the build process fragile and dependent on the availability and correctness of an
external resource without proper validation.

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