Skip to content

restapi: Don't log client errors as errors#2680

Merged
Hayden-IO merged 1 commit intosigstore:mainfrom
jku:less-error-logging
Nov 11, 2025
Merged

restapi: Don't log client errors as errors#2680
Hayden-IO merged 1 commit intosigstore:mainfrom
jku:less-error-logging

Conversation

@jku
Copy link
Copy Markdown
Member

@jku jku commented Nov 11, 2025

  • 400-499 should be logged as warning at most
  • The logged error should include the code: otherwise it's often a cryptic string that does not clearly say if it's a client issue or no.

* 400-499 should be logged as warning at most
* The logged error should include the code: otherwise it's often a
  cryptic string that does not really say if it's a client issue or no.
  Example:

     ERRROR: validation failure list: hash in body should match '^(sha512:)?[0-9a-fA-F]{128}$|^(sha256:)?[0-9a-fA-F]{64}$|^(sha1:)?[0-9a-fA-F]{40}$'

Signed-off-by: Jussi Kukkonen <[email protected]>
@jku jku requested a review from a team as a code owner November 11, 2025 10:35
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 11, 2025

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.15%. Comparing base (488eb97) to head (1ffc317).
⚠️ Report is 564 commits behind head on main.

Files with missing lines Patch % Lines
pkg/generated/restapi/configure_rekor_server.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2680       +/-   ##
===========================================
- Coverage   66.46%   26.15%   -40.31%     
===========================================
  Files          92      191       +99     
  Lines        9258    20126    +10868     
===========================================
- Hits         6153     5264      -889     
- Misses       2359    14033    +11674     
- Partials      746      829       +83     
Flag Coverage Δ
e2etests 49.67% <ø> (+2.11%) ⬆️
unittests 16.68% <0.00%> (-31.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Hayden-IO Hayden-IO merged commit 6630c2a into sigstore:main Nov 11, 2025
16 checks passed
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