diff --git a/Cargo.lock b/Cargo.lock index 37b65ea..b7edb61 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -512,7 +512,8 @@ dependencies = [ [[package]] name = "drogue-client" version = "0.10.0" -source = "git+https://github.com/drogue-iot/drogue-client?rev=4cb3417dba977dfb55a1a208d4cbdbab5e1ff737#4cb3417dba977dfb55a1a208d4cbdbab5e1ff737" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e7f21de8dfca6f1da9b6cfc9157186fead30558a98c9ea09e1e26264332f057" dependencies = [ "async-trait", "base64", @@ -1283,9 +1284,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openid" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab30a9456b3484c408d9708b6f65b2bd834fdf22b73567775e1ca6de5524dd19" +checksum = "874cd75d55a8371aa3abae9d6dc69e1f8c113e7169a7ddfe9d397c042edea732" dependencies = [ "base64", "biscuit", @@ -1725,7 +1726,8 @@ dependencies = [ [[package]] name = "reqwest-wasm-ext" version = "0.1.0" -source = "git+https://github.com/ctron/reqwest-wasm-ext.git#68c9aa5daee7f08d20d339a1224f028fb56f54cd" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e2dea89d75a433873c47f51a534dbd5a85c110e6e8a5fd57bbf34701cf7858" dependencies = [ "base64", "reqwest", diff --git a/Cargo.toml b/Cargo.toml index e34fd91..eb5770b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,6 +68,6 @@ test-utils = { path = "test-utils" } uuid = {version= "1.0", features = ["v4"]} [patch.crates-io] -drogue-client = { git = "https://github.com/drogue-iot/drogue-client", rev = "4cb3417dba977dfb55a1a208d4cbdbab5e1ff737" } # FIXME: awaiting release +#drogue-client = { git = "https://github.com/drogue-iot/drogue-client", rev = "94ece8681b6bca9c792d651690a03b219eb97e2d" } # FIXME: awaiting release #drogue-client = { path = "../drogue-client" } assert_cmd = { git = "https://github.com/jbtrystram/assert_cmd", rev = "7cee4bc51833617bfcc1b55d791cc57c4436b061"} #fixme https://github.com/assert-rs/assert_cmd/pull/144 \ No newline at end of file diff --git a/src/util/error.rs b/src/util/error.rs index ad756ce..7521ed9 100644 --- a/src/util/error.rs +++ b/src/util/error.rs @@ -22,12 +22,11 @@ impl From for DrogueError { match error { ClientError::Client(e) => DrogueError::UnexpectedClient(anyhow!(e)), ClientError::Request(msg) => DrogueError::UnexpectedClient(anyhow!("{}", msg)), - ClientError::Service { - code: c, - error: msg, - } => DrogueError::Service(msg.message, c.as_u16()), - ClientError::Response(c) => { - DrogueError::Service("Unknown error".to_string(), c.as_u16()) + ClientError::Service { error, code } => { + DrogueError::Service(error.message, code.as_u16()) + } + ClientError::Response(code) => { + DrogueError::Service(format!("Unexpected error HTTP {}", code), code.as_u16()) } ClientError::Token(e) => DrogueError::UnexpectedClient(anyhow!(e)), ClientError::Url(e) => DrogueError::ConfigIssue(format!("Invalid url: {}", e)),