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

Function test_parse_post_tool_use_error

atomic-agent/src/hooks/agy.rs:566–573  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

564
565 #[test]
566 fn test_parse_post_tool_use_error() {
567 let hook = make_hook();
568 let input = br#"{"conversationId": "ec33ebf9", "stepIdx": 7, "error": "exit status 1"}"#;
569 let event = hook.parse_event(HookType::PostToolUse, input).unwrap();
570 assert_eq!(event.tool_use_id.as_deref(), Some("7"));
571 let raw = event.raw_json.unwrap();
572 assert_eq!(raw.get("status").and_then(Value::as_str), Some("error"));
573 }
574
575 #[test]
576 fn test_parse_missing_conversation_id_defaults_unknown() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected