Skip to content

Add --fail to curl calls so a failed SignServer request fails the step#9

Merged
hanna-hansson merged 2 commits into
Keyfactor:mainfrom
pkiben:add-curl-fail-flag
Jul 8, 2026
Merged

Add --fail to curl calls so a failed SignServer request fails the step#9
hanna-hansson merged 2 commits into
Keyfactor:mainfrom
pkiben:add-curl-fail-flag

Conversation

@pkiben

@pkiben pkiben commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

None of the four curl invocations use --fail. If SignServer (or a proxy in front of it) returns an HTTP error, curl writes that error response body straight to the output file and still exits 0. The action then reports success and uploads the error page/body as if it were the signed artifact — which is a confusing thing to debug downstream (we hit this ourselves: an nginx 400 page got uploaded in place of a signed jar).

Fix

Add --fail to all four curl calls, so a non-2xx response actually fails the step instead of silently producing a bad artifact.

Test plan

  • Reproduced by pointing the action at an endpoint that returns a 400 and confirming the previous behavior wrote the error body to the output file with exit code 0
  • With --fail added, curl now exits non-zero on the same request

🤖 Generated with Claude Code

pkiben and others added 2 commits July 2, 2026 17:50
None of the curl invocations used --fail, so an HTTP error response
(e.g. a 4xx/5xx from SignServer or a proxy in front of it) gets written
straight to the output file, and curl exits 0. The action then reports
success and uploads the error response body as if it were the signed
artifact, which is confusing to debug downstream. Adding --fail makes
curl (and the step) actually fail on a non-2xx response.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@hanna-hansson hanna-hansson self-requested a review July 8, 2026 06:56

@hanna-hansson hanna-hansson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Code: looks good
Tests: tested with new workflow tests that will be added in separate PR
Docs: not needed

@hanna-hansson hanna-hansson merged commit a21c1a7 into Keyfactor:main Jul 8, 2026
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.

2 participants