errfmt

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitSuccess    = 0
	ExitGeneral    = 1
	ExitUsage      = 2
	ExitAuth       = 3
	ExitPermission = 4
	ExitNotFound   = 5
	ExitRateLimit  = 6
	ExitServer     = 7
)

Exit codes.

Variables

This section is empty.

Functions

func ExitCode

func ExitCode(err error) int

ExitCode returns the appropriate exit code for the given error.

func FormatAPIError

func FormatAPIError(apiErr *types.APIError) string

FormatAPIError formats a Notion API error with an actionable hint.

func FormatError

func FormatError(err error) string

FormatError converts an error to user-friendly output.

func GetHint

func GetHint(code string) string

GetHint returns an actionable suggestion for the given Notion API error code. Returns empty string if no hint is available.

Types

This section is empty.

Jump to

Keyboard shortcuts

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