Skip to content

Bump API schema to 3dd2b5de#16039

Closed
getsantry[bot] wants to merge 1 commit intomasterfrom
bot/bump-api-schema-to-3dd2b5de
Closed

Bump API schema to 3dd2b5de#16039
getsantry[bot] wants to merge 1 commit intomasterfrom
bot/bump-api-schema-to-3dd2b5de

Conversation

@getsantry
Copy link
Contributor

@getsantry getsantry bot commented Jan 15, 2026

No description provided.

@vercel
Copy link

vercel bot commented Jan 15, 2026

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

Project Deployment Review Updated (UTC)
develop-docs Ready Ready Preview, Comment Jan 15, 2026 9:01pm
sentry-docs Ready Ready Preview, Comment Jan 15, 2026 9:01pm

Review with Vercel Agent

@getsantry getsantry bot enabled auto-merge (squash) January 15, 2026 20:50
@@ -8,7 +8,7 @@ import {DeRefedOpenAPI} from './open-api/types';

// SENTRY_API_SCHEMA_SHA is used in the sentry-docs GHA workflow in getsentry/sentry-api-schema.
Copy link

Choose a reason for hiding this comment

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

Bug: The resolveOpenAPI function doesn't check if the HTTP response is successful before parsing it as JSON, which can cause cryptic build failures.
Severity: HIGH

Suggested Fix

Before calling await response.json(), add a check for the HTTP response status. If !response.ok, throw a new error with a more informative message, including the status and status text, to clarify why the fetch failed. This will prevent cryptic JSON parsing errors and make debugging build failures easier. Example: if (!response.ok) { throw new Error(Failed to fetch OpenAPI schema: ${response.status} ${response.statusText}); }.

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

Potential issue: The `resolveOpenAPI` function fetches an OpenAPI schema from a
`raw.githubusercontent.com` URL. It directly calls `response.json()` without first
verifying `response.ok`. If the requested file is unavailable (e.g., due to an invalid
commit SHA), GitHub will return a 404 response with an HTML body. The `fetch` API does
not treat this as an error, so the code proceeds to call `response.json()` on the HTML,
which throws a cryptic `SyntaxError`. Since this function is called during the build
process (`generateStaticParams`), this error will cause the entire site build to fail,
preventing deployment.

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

@cleptric cleptric closed this Jan 19, 2026
auto-merge was automatically disabled January 19, 2026 13:58

Pull request was closed

@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant