Skip to content

Opaque and stable errors#1375

Merged
yukibtc merged 11 commits into
nostrdevkit:masterfrom
yukibtc:errors
Jun 20, 2026
Merged

Opaque and stable errors#1375
yukibtc merged 11 commits into
nostrdevkit:masterfrom
yukibtc:errors

Conversation

@yukibtc

@yukibtc yukibtc commented Jun 3, 2026

Copy link
Copy Markdown
Member

Description

Use a single opaque error type per crate, backed by a small and stable ErrorKind enum. This keeps the public error API stable while allowing internal error sources to change without breaking downstream users.

Checklist

@yukibtc yukibtc added this to the v0.45 milestone Jun 3, 2026
@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 58.10089% with 706 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.21%. Comparing base (b46813e) to head (3c25983).
⚠️ Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
sdk/src/error.rs 47.95% 51 Missing ⚠️
crates/nostr/src/nips/nip47.rs 16.98% 44 Missing ⚠️
crates/nostr/src/event/builder.rs 17.39% 38 Missing ⚠️
crates/nostr-keyring/src/error.rs 0.00% 37 Missing ⚠️
crates/nostr/src/nips/nip34.rs 20.51% 31 Missing ⚠️
database/nostr-ndb/src/lib.rs 0.00% 31 Missing ⚠️
sdk/src/relay/inner.rs 29.72% 26 Missing ⚠️
crates/nostr/src/nips/nip60.rs 22.58% 24 Missing ⚠️
crates/nostr/src/nips/nip46.rs 32.35% 23 Missing ⚠️
signer/nostr-connect/src/error.rs 0.00% 23 Missing ⚠️
... and 88 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1375      +/-   ##
==========================================
+ Coverage   72.99%   75.21%   +2.22%     
==========================================
  Files         202      198       -4     
  Lines       33280    32439     -841     
==========================================
+ Hits        24292    24399     +107     
+ Misses       8988     8040     -948     
Flag Coverage Δ
rust 75.21% <58.10%> (+2.22%) ⬆️

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

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

yukibtc added 6 commits June 20, 2026 11:41
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc added 5 commits June 20, 2026 11:58
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
@yukibtc yukibtc merged commit 3c25983 into nostrdevkit:master Jun 20, 2026
45 of 46 checks passed
@yukibtc yukibtc deleted the errors branch June 20, 2026 10:06
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