diff --git a/Cargo.lock b/Cargo.lock index 9cb7376..ddbb352 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1104,7 +1104,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "twirp" -version = "0.3.0" +version = "0.4.0" dependencies = [ "async-trait", "axum", @@ -1125,7 +1125,7 @@ dependencies = [ [[package]] name = "twirp-build" -version = "0.3.0" +version = "0.4.0" dependencies = [ "prost-build", ] diff --git a/crates/twirp-build/Cargo.toml b/crates/twirp-build/Cargo.toml index 4159a21..650577d 100644 --- a/crates/twirp-build/Cargo.toml +++ b/crates/twirp-build/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "twirp-build" -version = "0.3.0" +version = "0.4.0" authors = ["The blackbird team "] edition = "2021" description = "Code generation for async-compatible Twirp RPC interfaces." diff --git a/crates/twirp/Cargo.toml b/crates/twirp/Cargo.toml index e6f3976..2259b37 100644 --- a/crates/twirp/Cargo.toml +++ b/crates/twirp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "twirp" -version = "0.3.0" +version = "0.4.0" authors = ["The blackbird team "] edition = "2021" description = "An async-compatible library for Twirp RPC in Rust." diff --git a/crates/twirp/src/client.rs b/crates/twirp/src/client.rs index e4de595..580cd96 100644 --- a/crates/twirp/src/client.rs +++ b/crates/twirp/src/client.rs @@ -7,9 +7,10 @@ use thiserror::Error; use url::Url; use crate::headers::{CONTENT_TYPE_JSON, CONTENT_TYPE_PROTOBUF}; -use crate::{serialize_proto_message, TwirpErrorResponse}; +use crate::{serialize_proto_message, GenericError, TwirpErrorResponse}; #[derive(Debug, Error)] +#[non_exhaustive] pub enum ClientError { #[error(transparent)] InvalidHeader(#[from] InvalidHeaderValue), @@ -36,6 +37,10 @@ pub enum ClientError { ReqwestError(#[from] reqwest::Error), #[error("twirp error: {0:?}")] TwirpError(TwirpErrorResponse), + + /// A generic error that can be used by custom middleware. + #[error(transparent)] + MiddlewareError(#[from] GenericError), } pub type Result = std::result::Result; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy