apierr

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unauthenticated = "E_UNAUTHENTICATED"
	Forbidden       = "E_FORBIDDEN"
	NotFound        = "E_NOT_FOUND"
	Conflict        = "E_REVISION_CONFLICT"
	Validation      = "E_VALIDATION"
	RateLimited     = "E_RATE_LIMITED"
	Internal        = "E_INTERNAL"

	DuplicatePendingTask = "E_DUPLICATE_PENDING_TASK"
	ActiveDuplicate      = "E_ACTIVE_DUPLICATE"
	SearchTimeout        = "E_SEARCH_TIMEOUT"
	AwaitingState        = "E_AWAITING_STATE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    string
	Message string
	Details []FieldError
}

func New

func New(code, msg string) *Error

func NewValidation

func NewValidation(msg string, fields ...FieldError) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) ErrorCode

func (e *Error) ErrorCode() string

type FieldError

type FieldError struct {
	Field   string `json:"field"`
	Problem string `json:"problem"`
}

Jump to

Keyboard shortcuts

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