errors

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLIError

type CLIError struct {
	Message    string
	Hint       string
	StatusCode int
}

CLIError is a user-facing error with an optional hint.

func FromHTTP

func FromHTTP(statusCode int, resourceID string) *CLIError

FromHTTP maps an HTTP status code to a user-friendly CLIError.

func FromSDK

func FromSDK(err error) *CLIError

FromSDK converts an SDK API error into a CLIError.

func New

func New(message, hint string) *CLIError

New creates a CLIError with the given message and optional hint.

func (*CLIError) Error

func (e *CLIError) Error() string

Jump to

Keyboard shortcuts

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