MCPcopy Index your code
hub / github.com/docker/docker-agent / notifyError

Method notifyError

pkg/runtime/hooks.go:251–254  ·  view source on GitHub ↗

notifyError fires both notification(level=error) and on_error in one call. They're always emitted together (an error is always also a user-facing notification), so collapsing them into one call expresses intent more directly than firing two events at every callsite.

(ctx context.Context, a *agent.Agent, sessionID, message string)

Source from the content-addressed store, hash-verified

249// user-facing notification), so collapsing them into one call expresses
250// intent more directly than firing two events at every callsite.
251func (r *LocalRuntime) notifyError(ctx context.Context, a *agent.Agent, sessionID, message string) {
252 r.notify(ctx, a, hooks.EventNotification, sessionID, "error", message)
253 r.notify(ctx, a, hooks.EventOnError, sessionID, "error", message)
254}
255
256// notifyMaxIterations fires both notification(level=warning) and
257// on_max_iterations. Same rationale as [notifyError]: the two are

Callers 4

runHarnessAgentMethod · 0.95
runTurnMethod · 0.95
handleStreamErrorMethod · 0.95

Calls 1

notifyMethod · 0.95

Tested by

no test coverage detected