Answer: The page only provides hook signatures for the error handling hook (ErrorOccurredHandler) in TypeScript, Python, Go, and .NET; it does not give step-by-step creation instructions. For Java, the SDK has no onErrorOccurred hook, so you use EventErrorPolicy and EventErrorHandler instead. Status: Confirmed Entry: tool/github-copilot/agents-and-automation/error-handling-hook-signature Revision: 3 Digest: sha256:5e1d4d9b663a2b0c (changes whenever the content changes) Timeline: Created: 2026-11-13T03:28:29Z Last changed: 2026-11-18T13:04:05Z (.NET signature: — → public delegate Task ErrorOccurredHandler( ErrorOccurredHookInput input, HookInvocation invocation);) Last verified: 2026-11-20T13:08:53Z Next check: 2026-11-21T13:08:53Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of TypeScript signature | ErrorOccurredHandler = ( input : ErrorOccurredHookInput , invocation : HookInvocation ) => Promise < ErrorOccurredHookOutput | null | undefined > | [1] | 2026-11-20 Python signature | ErrorOccurredHandler = Callable [ [ErrorOccurredHookInput, dict [ str , str ]], Awaitable[ErrorOccurredHookOutput | None ] ] | [1] | 2026-11-20 Go signature | type ErrorOccurredHandler func ( input ErrorOccurredHookInput, invocation HookInvocation, ) (*ErrorOccurredHookOutput, error ) | [1] | 2026-11-20 .NET signature | public delegate Task ErrorOccurredHandler( ErrorOccurredHookInput input, HookInvocation invocation); | [1] | 2026-11-20 Java note | Java SDK does not have an onErrorOccurred hook | [1] | 2026-11-20 Java alternative | Use EventErrorPolicy and EventErrorHandler instead | [1] | 2026-11-20 Sources: [1] GitHub. "Error handling hook - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/hooks/error-handling Role: primary. Accessed: 2026-11-20T13:08:53Z Quote: "TypeScript type ErrorOccurredHandler = ( input : ErrorOccurredHookInput , invocation : HookInvocation ) => Promise < ErrorOccurredHookOutput | null | undefined >;" (Supports: TypeScript signature) Quote: "Python ErrorOccurredHandler = Callable [ [ErrorOccurredHookInput, dict [ str , str ]], Awaitable[ErrorOccurredHookOutput | None ] ]" (Supports: Python signature) Quote: "Go type ErrorOccurredHandler func ( input ErrorOccurredHookInput, invocation HookInvocation, ) (*ErrorOccurredHookOutput, error )" (Supports: Go signature) Quote: ".NET public delegate Task ErrorOccurredHandler( ErrorOccurredHookInput input, HookInvocation invocation);" (Supports: .NET signature) Quote: "// Note: Java SDK does not have an onErrorOccurred hook." (Supports: Java note) Quote: "// Use EventErrorPolicy and EventErrorHandler instead:" (Supports: Java alternative) Snapshot SHA-256: 4b16a610889bf49eefe4c44b149289395e9e4f7627bdf7a349d6ce4cfbc12913 (captured 2026-11-18T13:04:06Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:04:05Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:08:53Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:08:53Z Last attempt: 2026-11-20T13:08:53Z Notes and limitations: Extracted automatically from a single official source (section "Hook signature"). Related: https://latestn.com/tool/github-copilot/agents-and-automation/error-hook-best-practices What are best practices for using the GitHub Copilot SDK error handling hook? https://latestn.com/tool/github-copilot/agents-and-automation/error-hook-input-output What input and output does the GitHub Copilot SDK error handling hook receive and return? https://latestn.com/tool/github-copilot/agents-and-automation/example-agent-profiles What example custom agent profiles does GitHub Copilot provide? https://latestn.com/tool/github-copilot/agents-and-automation/enable-skill-script How do I enable a GitHub Copilot CLI skill to run a script? https://latestn.com/tool/github-copilot/agents-and-automation/enable-skill-script-2 How do I enable a GitHub Copilot skill to run a script? https://latestn.com/tool/github-copilot/agents-and-automation/enable-subagents How do I enable subagents in GitHub Copilot in my IDE? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:04:05Z | changed | .NET signature: — → public delegate Task ErrorOccurredHandler( ErrorOccurredHookInput input, HookInvocation invocation); | [1] 2026-11-18T13:04:05Z | changed | Go signature: — → type ErrorOccurredHandler func ( input ErrorOccurredHookInput, invocation HookInvocation, ) (*ErrorOccurredHookOutput, error ) | [1] 2026-11-18T13:04:05Z | changed | Python signature: — → ErrorOccurredHandler = Callable [ [ErrorOccurredHookInput, dict [ str , str ]], Awaitable[ErrorOccurredHookOutput | None ] ] | [1] 2026-11-18T13:04:05Z | changed | TypeScript signature: — → ErrorOccurredHandler = ( input : ErrorOccurredHookInput , invocation : HookInvocation ) => Promise < ErrorOccurredHookOutput | null | undefined > | [1] 2026-11-18T13:04:05Z | changed | Java alternative: EventErrorPolicy and EventErrorHandler → Use EventErrorPolicy and EventErrorHandler instead | [1] 2026-11-18T13:04:05Z | changed | .NET hook type: ErrorOccurredHandler → — | [1] 2026-11-18T13:04:05Z | changed | Go hook type: ErrorOccurredHandler → — | [1] 2026-11-18T13:04:05Z | changed | Python hook type: ErrorOccurredHandler → — | [1] 2026-11-18T13:04:05Z | changed | TypeScript hook type: ErrorOccurredHandler → — | [1] 2026-11-16T12:52:52Z | changed | .NET hook type: — → ErrorOccurredHandler | [1] 2026-11-16T12:52:52Z | changed | Go hook type: — → ErrorOccurredHandler | [1] 2026-11-16T12:52:52Z | changed | Python hook type: — → ErrorOccurredHandler | [1] 2026-11-16T12:52:52Z | changed | TypeScript hook type: — → ErrorOccurredHandler | [1] 2026-11-16T12:52:52Z | changed | .NET signature: public delegate Task ErrorOccurredHandler( ErrorOccurredHookInput input, HookInvocation invocation); → — | [1] 2026-11-16T12:52:52Z | changed | Go signature: type ErrorOccurredHandler func ( input ErrorOccurredHookInput, invocation HookInvocation, ) (*ErrorOccurredHookOutput, error ) → — | [1] 2026-11-16T12:52:52Z | changed | Python signature: ErrorOccurredHandler = Callable [ [ErrorOccurredHookInput, dict [ str , str ]], Awaitable[ErrorOccurredHookOutput | None ] ] → — | [1] 2026-11-16T12:52:52Z | changed | TypeScript signature: ErrorOccurredHandler = ( input : ErrorOccurredHookInput , invocation : HookInvocation ) => Promise < ErrorOccurredHookOutput | null | undefined > → — | [1] 2026-11-13T03:28:29Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/agents-and-automation/error-handling-hook-signature/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/error-handling-hook-signature POST: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/error-handling-hook-signature with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/error-handling-hook-signature?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I create an error handling hook in the GitHub Copilot SDK? Revision 3, last verified 2026-11-20T13:08:53Z. https://latestn.com/tool/github-copilot/agents-and-automation/error-handling-hook-signature (accessed 2026-11-21T10:02:46Z). @misc{LatestN_tool_github_copilot_agents_and_automation_error_handling_hook_signature_r3, title = {How do I create an error handling hook in the GitHub Copilot SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/agents-and-automation/error-handling-hook-signature}}, note = {Revision 3; digest sha256:5e1d4d9b663a2b0c; last verified 2026-11-20T13:08:53Z; accessed 2026-11-21T10:02:46Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/agents-and-automation/error-handling-hook-signature