Skip to content

Conversation

getsantry[bot]
Copy link
Contributor

@getsantry getsantry bot commented Oct 6, 2025

No description provided.

@getsantry getsantry bot enabled auto-merge (squash) October 6, 2025 19:06
Copy link

vercel bot commented Oct 6, 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 Oct 6, 2025 7:49pm
sentry-docs Ready Ready Preview Comment Oct 6, 2025 7:49pm

// 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 = '02f06b8f76bb59e961f2c6eeeb6b87ab55f7e870';
const SENTRY_API_SCHEMA_SHA = 'f17a6ed19937d2d852808703456bfd6638bcac33';

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 error handling, which will cause an unhandled rejection and crash the build process if the request fails.
  • Description: In the resolveOpenAPI function, the production path fetches a schema from raw.githubusercontent.com. This fetch call is not wrapped in a try...catch block, nor does it validate the HTTP response status before calling response.json(). If the network request fails or GitHub returns a non-200 status (e.g., the file at the specified SHA does not exist), the await response.json() call will throw an error. Because this function is executed during static site generation, this unhandled promise rejection will crash the entire build process, preventing deployment.

  • Suggested fix: Wrap the fetch call and the subsequent response.json() in a try...catch block. Before parsing the JSON, check if response.ok is true. If the request fails or the response is not okay, log the error and explicitly throw an exception to ensure the build fails with a clear message rather than an unhandled rejection.
    severity: 0.7, confidence: 0.9

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

Copy link

codecov bot commented Oct 6, 2025

Bundle Report

Changes will decrease total bundle size by 15 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-client-array-push 10.15MB -6 bytes (-0.0%) ⬇️
sentry-docs-server-cjs 12.96MB -9 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

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/xTgiAiA_ghJK2997TRfjK/_buildManifest.js (New) 684 bytes 684 bytes 100.0% 🚀
static/xTgiAiA_ghJK2997TRfjK/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/eAmSoLVXMJHw2sRBKeTCm/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/eAmSoLVXMJHw2sRBKeTCm/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
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%

@AbhiPrasad AbhiPrasad closed this Oct 8, 2025
auto-merge was automatically disabled October 8, 2025 21:12

Pull request was closed

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.

1 participant