()
| 388 | |
| 389 | #[test] |
| 390 | fn parse_error_body_401() { |
| 391 | let client = StorageClient::new("https://example.com", "acme", "tok").unwrap(); |
| 392 | let body = r#"{"success":false,"error":{"code":"UNAUTHORIZED","message":"bad token"}}"#; |
| 393 | let err = client.parse_error_body(401, body); |
| 394 | assert!(err.to_string().contains("bad token")); |
| 395 | assert!(err.is_auth_error()); |
| 396 | } |
| 397 | |
| 398 | #[test] |
| 399 | fn parse_error_body_404() { |
nothing calls this directly
no test coverage detected