apierror

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 2 Imported by: 11 modules, 55 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAPIError

func IsAPIError(err error) bool

func IsConflict

func IsConflict(err error) bool

func NewAPIError

func NewAPIError(code validation.ErrorCode, message string) error

func NewFieldAPIError

func NewFieldAPIError(code validation.ErrorCode, fieldName, message string) error

func WrapAPIError

func WrapAPIError(err error, code validation.ErrorCode, message string) error

WrapAPIError will cause the API framework to log the underlying err before returning the APIError as a response. err WILL NOT be in the API response

func WrapFieldAPIError

func WrapFieldAPIError(err error, code validation.ErrorCode, fieldName, message string) error

WrapFieldAPIError will cause the API framework to log the underlying err before returning the APIError as a response. err WILL NOT be in the API response

Types

type APIError

type APIError struct {
	Code      validation.ErrorCode
	Message   string
	Cause     error
	FieldName string
}

func (*APIError) Error

func (a *APIError) Error() string

Jump to

Keyboard shortcuts

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