Skip to main content

Module errors

Module errors 

Source
Expand description

Structured tool/service error DTO shared by REST and MCP error rendering.

Lives beside actions.rs in soma-domain: ToolError/ServiceErrorKind are produced in soma-application (via classify_service_error) but the shape is consumed directly by soma-mcp (protocol_errors.rs) and soma-cli for rendering, independent of whichever layer classified the error. soma-domain is the lowest common ancestor every consumer (application, api, cli, mcp, integrations, runtime, apps/soma) can depend on without cycles.

Structs§

ToolError
Structured error DTO shared by REST and MCP rendering surfaces.

Enums§

ServiceErrorKind
High-level category of a service/tool failure, driving HTTP status, retryability, and the kind field rendered to REST and MCP clients.

Functions§

classify_execution_error
Classifies an execution error into a ServiceErrorKind by scanning its message for known failure signatures (timeout, rate limit, auth, upstream).

Type Aliases§

ServiceError
Alias for ToolError used where the error is framed as a service error.