errors

package
v1.2.17 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDomainNotFound         = New(Code(200001), "domain not found", "domain not found")
	ErrRedirectUriNotFound    = New(Code(200002), "redirect_uri not found", "redirect_uri not found")
	ErrCodeNotFound           = New(Code(200003), "code not found", "code not found")
	ErrUUIDNotFound           = New(Code(200004), "uuid not found", "uuid not found")
	ErrInvalidUUID            = New(Code(200005), "invalid not found", "invalid not found")
	ErrNotFoundState          = New(Code(200006), "not found state", "not found state")
	ErrAccountOrPasswordError = New(Code(200007), "account doesn't exist or password error", "account doesn't exist or password error")
	ErrRecordExisted          = New(Code(200008), "the record already exists", "the record already exists")
)
View Source
var (
	ErrNotFound                = New(Code(100002), "record has not found", "not found")
	ErrInvalidRedirectURI      = New(Code(100004), "invalid redirect uri", "invalid redirect uri")
	ErrInvalidAuthorizeCode    = New(Code(100005), "invalid authorize code", "invalid authorize code")
	ErrInvalidAccessToken      = New(Code(100006), "invalid access token", "invalid access token")
	ErrInvalidEncryData        = New(Code(100007), "invalid encry data", "invalid encry data")
	ErrInvalidRefreshToken     = New(Code(100008), "invalid refresh token", "invalid refresh token")
	ErrExpiredAccessToken      = New(Code(100009), "expired access token", "expired access token")
	ErrExpiredRefreshToken     = New(Code(100010), "expired refresh token", "expired refresh token")
	ErrInvalidRequest          = New(Code(100011), "invalid request", "invalid request")
	ErrUnauthorizedClient      = New(Code(100012), "unauthorized client", "unauthorized client")
	ErrAccessDenied            = New(Code(100013), "access denied", "access denied")
	ErrUnsupportedResponseType = New(Code(100014), "unsupported response_type", "unsupported response_type")
	ErrInvalidScope            = New(Code(100015), "invalid scope", "invalid scope")
	ErrServerError             = New(Code(100016), "server error", "server error")
	ErrTemporarilyUnavailable  = New(Code(100017), "temporarily unavailable", "temporarily unavailable")
	ErrInvalidClient           = New(Code(100018), "invalid client", "invalid client")
	ErrInvalidGrant            = New(Code(100019), "invalid grant", "invalid grant")
	ErrUnsupportedGrantType    = New(Code(100020), "unsupported grant_type", "unsupported grant_type")
	ErrInvalidDomain           = New(Code(100021), "invalid domain", "invalid domain")
	ErrNotFoundDB              = New(Code(100022), "not found db", "not found db")
	ErrNotFoundProvider        = New(Code(100023), "not found auth provider", "not found auth provider")
	ErrAuthenticationFailed    = New(Code(100024), "authentication failed", "authentication failed")
)

Functions

func Code added in v1.2.17

func Code(u uint32) uint32

func New added in v1.2.17

func New(code uint32, msg, status string) error

func NewWithError added in v1.2.17

func NewWithError(code uint32, e error, status string) error

func Wrap

func Wrap(e interface{}, skip int) *errors.Error

Types

type Error added in v1.2.17

type Error interface {
	Error() string
	Code() uint32
	Status() string
}

Jump to

Keyboard shortcuts

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