MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / parse_error_body_401

Function parse_error_body_401

atomic-remote/src/storage.rs:390–396  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 2

parse_error_bodyMethod · 0.80
unwrapMethod · 0.45

Tested by

no test coverage detected