errclass

package
v1.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package errclass maps pkg/client errors to a stable code/message/hint classification. The CLI wraps a Classified into its error envelope (adding context-specific hints and the exit code); the MCP server renders it as a tool error. Keeping the mapping here means both surfaces branch on the same snake_case codes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Classified

type Classified struct {
	Code     string
	Message  string
	Hint     string
	ExitCode int
}

Classified is the surface-agnostic classification of a client error.

func Classify

func Classify(err error) Classified

Classify maps a pkg/client error to its classification. The token_expired hint is the plain "traceway login"; callers with more context (an explicit --profile, a login command, an MCP session) override it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL