Repository: sugyan/atrium (language: rust)

Issue:
bsky_sdk::error::GenericXrpcError is not re-exported
Hello guys!

Nice work you've been doing here <3

I wanted to ask if there's any good reason bsky_sdk::error::GenericXrpcError is not re-exported?
I'm struggling to find a way to read the status code, and, because it is not re-exported, I'm unfortunately having to resort to.. well...
![image](https://github.com/user-attachments/assets/fe223835-87aa-471c-93c7-236e6d058c33)
...this horrid thing LOL

Thanks ahead for the support!


Discussion / hints:

Fix patch:
diff --git a/bsky-sdk/src/error.rs b/bsky-sdk/src/error.rs
index 0d1c3822..982f0934 100644
--- a/bsky-sdk/src/error.rs
+++ b/bsky-sdk/src/error.rs
@@ -1,3 +1,4 @@
+//! Error types for the Bsky SDK.
 use atrium_api::xrpc::error::XrpcErrorKind;
 use atrium_api::xrpc::http::StatusCode;
 use atrium_api::xrpc::Error as XrpcError;
@@ -23,6 +24,7 @@ pub enum Error {
     Moderation(#[from] crate::moderation::Error),
 }
 
+/// Generic error type for XRPC errors.
 #[derive(Error, Debug)]
 pub enum GenericXrpcError {
     Response {
diff --git a/bsky-sdk/src/lib.rs b/bsky-sdk/src/lib.rs
index a3fac26e..ef34ae15 100644
--- a/bsky-sdk/src/lib.rs
+++ b/bsky-sdk/src/lib.rs
@@ -1,7 +1,7 @@
 #![cfg_attr(docsrs, feature(doc_cfg))]
 #![doc = include_str!("../README.md")]
 pub mod agent;
-mod error;
+pub mod error;
 pub mod moderation;
 pub mod preference;
 pub mod record;


Test patch: