Skip to content

Commit

Permalink
Fixing Display for bonsaidb::client::Error::Core
Browse files Browse the repository at this point in the history
This afternoon was very confusing as to why I kept getting unexpectedly
disconnected when mundane errors were occurring.
  • Loading branch information
ecton committed Nov 27, 2023
1 parent 9b8700a commit c01f891
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions crates/bonsaidb-client/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
]
}
Expand Down

0 comments on commit c01f891

Please sign in to comment.