From dec928fd6d4546d182ff332293ec2f18256c8ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Thu, 24 Sep 2026 13:55:45 +0300 Subject: [PATCH 1/2] chore: follow redirects and fail on errors in sync `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 --- scripts/sync.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/sync.sh b/scripts/sync.sh index 23e78fff..a1dbc46f 100755 --- a/scripts/sync.sh +++ b/scripts/sync.sh @@ -2,7 +2,7 @@ set -ex -curl -s -o ./res/fingerprint-server-api.yaml https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/schemas/fingerprint-server-api-v4.yaml +curl -fsL -o ./res/fingerprint-server-api.yaml https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/schemas/fingerprint-server-api-v4.yaml examplesList=( 'webhook/webhook_event.json' @@ -37,5 +37,5 @@ examplesList=( ) for example in "${examplesList[@]}"; do - curl --create-dirs -s -o ./sdk/src/test/resources/mocks/"$example" https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/examples/"$example" + curl --create-dirs -fsL -o ./sdk/src/test/resources/mocks/"$example" https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/examples/"$example" done \ No newline at end of file From 49af7fd35d6118645178d25fec6f19524299a1b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Thu, 24 Sep 2026 14:04:26 +0300 Subject: [PATCH 2/2] chore: print curl error message when sync download fails --- scripts/sync.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/sync.sh b/scripts/sync.sh index a1dbc46f..ec9d7957 100755 --- a/scripts/sync.sh +++ b/scripts/sync.sh @@ -2,7 +2,7 @@ set -ex -curl -fsL -o ./res/fingerprint-server-api.yaml https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/schemas/fingerprint-server-api-v4.yaml +curl -fsSL -o ./res/fingerprint-server-api.yaml https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/schemas/fingerprint-server-api-v4.yaml examplesList=( 'webhook/webhook_event.json' @@ -37,5 +37,5 @@ examplesList=( ) for example in "${examplesList[@]}"; do - curl --create-dirs -fsL -o ./sdk/src/test/resources/mocks/"$example" https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/examples/"$example" + curl --create-dirs -fsSL -o ./sdk/src/test/resources/mocks/"$example" https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/examples/"$example" done \ No newline at end of file