From c01f891c3299faf048e51636d0aafd1af163ae16 Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Sun, 26 Nov 2023 16:30:29 -0800 Subject: [PATCH] Fixing Display for bonsaidb::client::Error::Core This afternoon was very confusing as to why I kept getting unexpectedly disconnected when mundane errors were occurring. --- CHANGELOG.md | 7 +++++++ crates/bonsaidb-client/src/error.rs | 4 ++-- xtask/src/main.rs | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ce97f1d12..6ef665ae2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed + +- `bonsaidb::client::Error::Core`'s `Display` no longer just prints "unexpected + disconnection". Instead, the inner error's `Display` is now displayed. + ## v0.5.0 ### Breaking Changes diff --git a/crates/bonsaidb-client/src/error.rs b/crates/bonsaidb-client/src/error.rs index bd19442376..777220ad0e 100644 --- a/crates/bonsaidb-client/src/error.rs +++ b/crates/bonsaidb-client/src/error.rs @@ -18,8 +18,8 @@ pub enum Error { #[error("invalid url: '{0}'")] InvalidUrl(String), - /// The connection was interrupted. - #[error("unexpected disconnection")] + /// A BonsaiDb error occurred. + #[error("{0}")] Core(#[from] bonsaidb_core::Error), /// An error from a `Api`. The actual error is still serialized, as it diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 91b70b4fcb..dafd863556 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -69,6 +69,7 @@ impl publish::Config for Config { String::from("crates/bonsaidb-server"), String::from("crates/bonsaidb-client"), String::from("crates/bonsaidb-keystorage-s3"), + String::from("crates/bonsaidb-files"), String::from("crates/bonsaidb"), ] }