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

Function parse_error_body_404

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

Source from the content-addressed store, hash-verified

397
398 #[test]
399 fn parse_error_body_404() {
400 let client = StorageClient::new("https://example.com", "acme", "tok").unwrap();
401 let body =
402 r#"{"success":false,"error":{"code":"NOT_FOUND","message":"workspace not found"}}"#;
403 let err = client.parse_error_body(404, body);
404 assert!(err.is_not_found());
405 }
406
407 #[test]
408 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