Skip to content

Commit

Permalink
update to released drogue-client 0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
jbtrystram committed Jun 1, 2022
1 parent 8dd68cc commit 58a62b8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
10 changes: 6 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 5 additions & 6 deletions src/util/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ impl From<ClientError> 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)),
Expand Down

0 comments on commit 58a62b8

Please sign in to comment.