()
| 645 | |
| 646 | #[test] |
| 647 | fn parse_error_body_401() { |
| 648 | let client = StorageClient::new("https://example.com", "acme", "tok").unwrap(); |
| 649 | let body = r#"{"success":false,"error":{"code":"UNAUTHORIZED","message":"bad token"}}"#; |
| 650 | let err = client.parse_error_body(401, body); |
| 651 | assert!(err.to_string().contains("bad token")); |
| 652 | assert!(err.is_auth_error()); |
| 653 | } |
| 654 | |
| 655 | #[test] |
| 656 | fn parse_error_body_404() { |
nothing calls this directly
no test coverage detected