err

package
v0.0.0-...-44d5095 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Custom error package

Index

Constants

View Source
const (
	ErrInvalid         errCode = "INVALID_INPUT"
	ErrUnAuthenticated errCode = "NOT_FOUND"
	ErrForbidden       errCode = "FORBIDDEN"
	ErrInternal        errCode = "INTERNAL"
	ErrTimeout         errCode = "TIMEOUT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Err

type Err struct {
	// inner error, optional
	Err error
	// error code explaining the error
	Code       errCode
	Message    string
	Resolution string
}

func (*Err) Error

func (e *Err) Error() (errStr string)

func (*Err) GetHTTPStatusCode

func (e *Err) GetHTTPStatusCode() (s int)

func (*Err) MarshalJSON

func (e *Err) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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