apierror

package
v0.0.0-...-52cadad Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIError

func NewAPIError(code validation.ErrorCode, 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

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