apierror

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detail

func Detail(info Info) string

func MitigationForCode

func MitigationForCode(code string) string

func TruncateDetail

func TruncateDetail(value string) string

Types

type Info

type Info struct {
	Code       string
	Type       string
	Message    string
	Body       string
	Mitigation string
}

Info captures the structured tunnel-service API error envelope used by both runtime control-plane calls and admin CRUD commands.

func Parse

func Parse(body []byte) Info

Parse extracts the standard {"error": {...}} envelope, falling back to top-level message/type/code or detail shapes used by adjacent API middleware.

Jump to

Keyboard shortcuts

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