atagen

malice

public
Star0
Watch0

Commit 2fd195b22029

tarball

atagen <boss@atagen.co>2026-10-26 08:03 UTC

1 file changed+5-1
core: include the engine's source error in upstream failures

"timeline operation failed" reached the client with the sdk's reason dropped, so failures like the empty-history opens couldn't be told apart from the banner.
Modified file: crates/malice-core/src/error.rs+5 additions−1 deletions
@@ -78,6 +78,10 @@ impl From<macltok::Error> for CoreError {
7878 | ErrorKind::Encryption
7979 | ErrorKind::Other => Failure::Upstream,
8080 };
81- Self::new(kind, error.message)
81+ let message = match (&kind, std::error::Error::source(&error)) {
82+ (Failure::Upstream, Some(source)) => format!("{}: {source}", error.message),
83+ _ => error.message,
84+ };
85+ Self::new(kind, message)
8286 }
8387 }