Skip to content

Conversation

@getsantry
Copy link
Contributor

@getsantry getsantry bot commented Sep 18, 2025

No description provided.

@vercel
Copy link

vercel bot commented Sep 18, 2025

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

Project Deployment Preview Comments Updated (UTC)
develop-docs Ready Ready Preview Comment Sep 18, 2025 6:35pm
sentry-docs Ready Ready Preview Comment Sep 18, 2025 6:35pm

@getsantry getsantry bot enabled auto-merge (squash) September 18, 2025 18:04
Comment on lines +11 to 14
const SENTRY_API_SCHEMA_SHA = '6ba1c0041dd7a133057e602ed1495d03e938b109';

const activeEnv = process.env.GATSBY_ENV || process.env.NODE_ENV || 'development';

Copy link
Contributor

Choose a reason for hiding this comment

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

Potential bug: The fetch call in resolveOpenAPI lacks HTTP status checking before parsing the JSON response, which can crash the build process on failure.
  • Description: The resolveOpenAPI function fetches a schema from a GitHub URL. It does not check the HTTP response status before attempting to parse the body with response.json(). If the SENTRY_API_SCHEMA_SHA is invalid, GitHub returns a 404 response with an HTML body. Attempting to parse this HTML as JSON throws a SyntaxError. Because this function is executed during static site generation, this unhandled exception will crash the entire build process, preventing deployment. This failure pattern has occurred previously, as seen in a past Sentry issue.

  • Suggested fix: After the fetch call, check the response.ok status. If the response is not successful, throw a descriptive error to fail the build gracefully instead of letting the response.json() call raise an unhandled SyntaxError.
    severity: 0.85, confidence: 0.95

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

@codecov
Copy link

codecov bot commented Sep 18, 2025

Bundle Report

Changes will increase total bundle size by 2.96kB (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-client-array-push 9.91MB -6 bytes (-0.0%) ⬇️
sentry-docs-server-cjs 12.66MB 2.97kB (0.02%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.78MB -0.0%
../instrumentation.js -3 bytes 1.1MB -0.0%
9523.js -3 bytes 1.08MB -0.0%
../app/[[...path]]/page.js.nft.json 993 bytes 820.47kB 0.12%
../app/platform-redirect/page.js.nft.json 993 bytes 820.39kB 0.12%
../app/sitemap.xml/route.js.nft.json 993 bytes 817.86kB 0.12%
view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 882.71kB -0.0%
static/chunks/8321-*.js -3 bytes 425.87kB -0.0%
static/YyavlDtyBJWGB6ILzdZ4M/_buildManifest.js (New) 684 bytes 684 bytes 100.0% 🚀
static/YyavlDtyBJWGB6ILzdZ4M/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/nLqxp6y9jtL2gZdFDycSU/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/nLqxp6y9jtL2gZdFDycSU/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

@getsantry getsantry bot merged commit 452c3d1 into master Sep 18, 2025
15 checks passed
@getsantry getsantry bot deleted the bot/bump-api-schema-to-6ba1c004 branch September 18, 2025 18:35
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 2025
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.

2 participants