( toolName: string, toolInput: unknown, toolUseId: string, error: string, isInterrupt?: boolean, )
| 104 | } |
| 105 | |
| 106 | export async function firePostToolUseFailure( |
| 107 | toolName: string, |
| 108 | toolInput: unknown, |
| 109 | toolUseId: string, |
| 110 | error: string, |
| 111 | isInterrupt?: boolean, |
| 112 | ): Promise<HookEventResult> { |
| 113 | if (!isHookServiceReady()) return NOOP_RESULT; |
| 114 | |
| 115 | const input: PostToolUseFailureInput = { |
| 116 | ...getCommonFields(), |
| 117 | hook_event_name: "PostToolUseFailure", |
| 118 | tool_name: toolName, |
| 119 | tool_input: toolInput, |
| 120 | tool_use_id: toolUseId, |
| 121 | error, |
| 122 | is_interrupt: isInterrupt, |
| 123 | }; |
| 124 | |
| 125 | return services.hooks.fireEvent(input); |
| 126 | } |
| 127 | |
| 128 | // --------------------------------------------------------------------------- |
| 129 | // Lifecycle events |
nothing calls this directly
no test coverage detected