errors

package
v0.0.0-...-9528e98 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category string

Category of errors

const (
	// APIERROR : An error occurred with the Safepay API itself.
	APIERROR Category = "API_ERROR"

	// VALIDATIONERROR : The request was invalid.
	// Most commonly, a required parameter was missing,
	// or a provided parameter had an invalid value.
	VALIDATIONERROR Category = "VALIDATION_ERROR"

	// BADREQUEST - a general error occurred.
	BADREQUEST Category = "BAD_REQUEST"

	// NOTFOUND ...
	NOTFOUND Category = "NOT_FOUND"

	// AUTHENTICATIONERROR : An authentication error occurred.
	// Most commonly, the request had a missing, malformed, or
	// otherwise invalid Authorization header.
	AUTHENTICATIONERROR Category = "AUTHENTICATION_ERROR"

	// DECODINGERROR: json decoding errors
	DECODINGERROR Category = "DECODING_ERROR"
)

func (Category) String

func (c Category) String() string

String <>

type Error

type Error struct {
	Category Category `json:"category"`
	Message  string   `json:"message"`
}

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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