errors

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidMethod            = InvalidMethod("Please use GET and POST only for this endpoint")
	ErrInvalidInput             = InvalidInput("Please specify input field")
	ErrInvalidOperation         = InvalidInput("Operation is not allowed")
	ErrInvalidInputToBeOperated = InvalidInput("Input can't be operated")
)

Registered Error

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	ErrorCode    string `json:"error_code"`
	ErrorMessage string `json:"error_message"`
}

type InvalidInput

type InvalidInput string

InvalidInput represent as the error for invalid input

func (InvalidInput) ErrCode

func (e InvalidInput) ErrCode() string

func (InvalidInput) Error

func (e InvalidInput) Error() string

func (InvalidInput) StatusCode

func (e InvalidInput) StatusCode() int

type InvalidMethod

type InvalidMethod string

InvalidMethod represent as the error for invalid method

func (InvalidMethod) ErrCode

func (e InvalidMethod) ErrCode() string

func (InvalidMethod) Error

func (e InvalidMethod) Error() string

func (InvalidMethod) StatusCode

func (e InvalidMethod) StatusCode() int

type WrappedError

type WrappedError interface {
	error
	StatusCode() int
	ErrCode() string
}

Jump to

Keyboard shortcuts

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