Skip to content

ref(service): Use static context strings and helper functions for errors#532

Closed
jan-auer wants to merge 1 commit into
mainfrom
ref/error-static-context
Closed

ref(service): Use static context strings and helper functions for errors#532
jan-auer wants to merge 1 commit into
mainfrom
ref/error-static-context

Conversation

@jan-auer

@jan-auer jan-auer commented Jul 1, 2026

Copy link
Copy Markdown
Member

Use static string references for error context where possible, avoiding unnecessary allocations for fixed messages. Where context must be dynamic (e.g. including a key name or endpoint in the message), accept owned strings through a flexible parameter type rather than requiring callers to manually convert.

Introduce ergonomic helper functions for constructing errors so that call sites can provide context and cause directly without manually boxing or assembling struct literals.

Use static string references for error context where possible, avoiding
unnecessary allocations for fixed messages. Introduce ergonomic helper
functions so call sites can construct errors concisely without manually
boxing causes or assembling struct literals.
@jan-auer
jan-auer requested a review from a team as a code owner July 1, 2026 08:56
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 23.25581% with 66 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.41%. Comparing base (d043aa4) to head (59699c1).

Files with missing lines Patch % Lines
objectstore-service/src/backend/gcs.rs 29.72% 26 Missing ⚠️
objectstore-service/src/error.rs 7.14% 13 Missing ⚠️
objectstore-service/src/backend/bigtable.rs 20.00% 12 Missing ⚠️
objectstore-service/src/backend/local_fs.rs 0.00% 8 Missing ⚠️
objectstore-service/src/backend/s3_compatible.rs 36.36% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #532      +/-   ##
==========================================
+ Coverage   87.17%   87.41%   +0.23%     
==========================================
  Files          89       89              
  Lines       14150    14116      -34     
==========================================
+ Hits        12335    12339       +4     
+ Misses       1815     1777      -38     
Components Coverage Δ
Rust Backend 92.20% <23.25%> (+0.31%) ⬆️
Rust Client 79.89% <ø> (ø)
Python Client 88.70% <ø> (ø)

☔ View full report in Codecov by Harness.
📢 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.

@jan-auer

jan-auer commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

Closing in favor of #493

@jan-auer jan-auer closed this Jul 1, 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.

1 participant