xerror

package
v0.0.2-rc-ci Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

package xerror defines a set of errors types, each indicating a category of errors. They are supposed to be used application wide.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAuthError

func IsAuthError(err error) bool

IsAuthError returns true if the error is of type AuthError.

func IsBadInputError

func IsBadInputError(err error) bool

IsBadInputError returns true if the error is of type BadInputError.

func IsNotFoundError

func IsNotFoundError(err error) bool

IsNotFoundError returns true if the error is of type NotFoundError.

Types

type AuthError

type AuthError struct {
	Err error
}

BadInputError indicates a invalid authorization.

func (AuthError) Error

func (b AuthError) Error() string

Error returns the underlying error as a string.

type BadInputError

type BadInputError struct {
	Err error
}

BadInputError indicates a wrong user input.

func (BadInputError) Error

func (b BadInputError) Error() string

Error returns the underlying error as a string.

type NotFoundError

type NotFoundError struct {
	Err  error
	Type string
}

NotFoundError indicates something was not found

func (NotFoundError) Error

func (n NotFoundError) Error() string

Error returns the underlying error as a string.

Jump to

Keyboard shortcuts

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