Skip to content

docs: reflect typed error sources across the workspace - #239

Merged
mintlify[bot] merged 1 commit into
mainfrom
mintlify/typed-errors-1777181994
Apr 26, 2026
Merged

mintlify[bot] merged 1 commit into
mainfrom
mintlify/typed-errors-1777181994

Conversation

@mintlify

@mintlify mintlify Bot commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Aligns the docs with oxidezap/whatsapp-rust#597, which preserves typed error sources across the workspace instead of stringifying them.

Changes

  • api/store.mdx — Updated the StoreError enum to the new shape (Connection, Database, Migration, Serialization now carry #[source] Box<dyn Error + Send + Sync>; new Validation, RetriesExhausted, InvalidConfig variants; removed NotFound, Backend). Added a note on is_database_busy_or_locked(). Updated the Redis example to wrap inner errors with Box::new(e) instead of e.to_string().
  • guides/custom-backends.mdx — Updated StoreError::Serialization / StoreError::Database call sites to use Box::new(e). Replaced the now-removed StoreError::Deserialization with StoreError::Serialization.
  • advanced/websocket-handling.mdx — Replaced SocketError::Crypto(String) and NoiseHandshake(String) with the new Cipher(NoiseError) and Marshal(BinaryError) variants. Updated the decrypt_frame example accordingly. Added a note on walking source() to downcast.
  • concepts/architecture.mdx — Updated the SocketError snippet in the error-handling section.
  • concepts/authentication.mdx — Replaced the PairCodeError::CryptoError(String) / RequestFailed(String) match with the typed split: InvalidPrimaryEphemeralKey, InvalidPrimaryIdentityKey, EphemeralKeyAgreement, IdentityKeyAgreement, AdvSecretKeyDerivation, BundleKeyDerivation, BundleAead. Wrapped everything in the new outer PairError::PairCode / PairError::RequestFailed(IqError) enum.
  • api/client.mdx — Updated pair_with_code return type to Result<String, PairError> and refreshed the error table.

Validation

  • mint validate — passes
  • mint broken-links — no broken links

Source: oxidezap/whatsapp-rust@0b785d1

@mintlify
mintlify Bot merged commit ed1e35d into main Apr 26, 2026
1 check 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.

0 participants