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

Function parse_error_body_404

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

Source from the content-addressed store, hash-verified

654
655 #[test]
656 fn parse_error_body_404() {
657 let client = StorageClient::new("https://example.com", "acme", "tok").unwrap();
658 let body =
659 r#"{"success":false,"error":{"code":"NOT_FOUND","message":"workspace not found"}}"#;
660 let err = client.parse_error_body(404, body);
661 assert!(err.is_not_found());
662 }
663
664 #[test]
665 fn parse_error_body_non_json() {

Callers

nothing calls this directly

Calls 2

parse_error_bodyMethod · 0.80
unwrapMethod · 0.45

Tested by

no test coverage detected