()
| 415 | |
| 416 | #[test] |
| 417 | fn parse_error_body_401() { |
| 418 | let client = StorageClient::new("https://example.com", "acme", "tok").unwrap(); |
| 419 | let body = r#"{"success":false,"error":{"code":"UNAUTHORIZED","message":"bad token"}}"#; |
| 420 | let err = client.parse_error_body(401, body); |
| 421 | assert!(err.to_string().contains("bad token")); |
| 422 | assert!(err.is_auth_error()); |
| 423 | } |
| 424 | |
| 425 | #[test] |
| 426 | fn parse_error_body_404() { |
nothing calls this directly
no test coverage detected