Skip to content

Commit 69708fe

Browse files
committed
More debuggable error
prtest:all
1 parent 52a4455 commit 69708fe

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

crates/test-programs/src/bin/http_outbound_request_invalid_dnsname.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ fn main() {
1010
None,
1111
);
1212

13-
assert!(matches!(
14-
res.unwrap_err()
15-
.downcast::<ErrorCode>()
16-
.expect("expected a wasi-http ErrorCode"),
17-
ErrorCode::DnsError(_)
18-
));
13+
let e = res.unwrap_err();
14+
assert!(
15+
matches!(
16+
e.downcast_ref::<ErrorCode>()
17+
.expect("expected a wasi-http ErrorCode"),
18+
ErrorCode::DnsError(_)
19+
),
20+
"Unexpected error: {e:#?}"
21+
);
1922
}

0 commit comments

Comments
 (0)