Expand description
Structured error codes and JSON error formatting for agent-first UX.
Error code taxonomy (dot-separated):
input.missing_arg,input.invalid_valueauth.expired,auth.scope_denied,auth.missing_keyprovider.timeout,provider.upstream_error,provider.not_foundtool.not_found,tool.execution_failed
Functions§
- classify_
error - Classify an error into a dot-separated error code by inspecting its message.
- exit_
code_ for_ error - Map an error code to a process exit code.
- format_
structured_ error - Format a structured JSON error string for –output json mode.