Repository navigation
INTER-2470: Follow redirects and fail on errors in sync script - #52
Merged
Merged
Conversation
`curl -s` neither follows redirects nor fails on HTTP errors, so both cases silently succeed: - On a 301, curl writes a 0-byte file and exits 0. - On a 4xx/5xx, curl writes the error page body into the output file and exits 0 Add -f and -L to curl calls so redirects are followed and HTTP errors abort the script. Related-Task: INTER-2470
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The changes correctly prevent silent failures while preserving existing behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Updates the sync script to reliably download valid schemas and examples.
Changes:
- Follow HTTP redirects with
-L. - Fail on HTTP errors with
-f.
| File | Description |
|---|---|
scripts/sync.sh |
Strengthens curl failure handling for synchronized resources. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
pnpm exec changesetto create a changeset. |
erayaydin
marked this pull request as ready for review
September 24, 2026 11:08
erayaydin
requested review from
Orkuncakilkaya,
ilfa,
mcnulty-fp and
necipallef
as code owners
September 24, 2026 11:08
necipallef
approved these changes
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
scripts/sync.shusedcurl -s, which neither follows redirects (-L) nor fails on HTTP errors (-f). Both failure modesexit 0, soset -enever fires and codegen silently runs against a corrupt schema.-salso suppresses the reason for a failure.-Sshows the error message.