errors

package
v1.8.94 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewError

func NewError(text string) error

NewError returns a generic new error

Types

type ArgumentError

type ArgumentError struct {
	// contains filtered or unexported fields
}

ArgumentError is an error thrown when a method does not have the proper input to perform the intended action

func NewArgumentError

func NewArgumentError(s string) ArgumentError

NewArgumentError returns a new ArgumentError BadRequest - 400

func (ArgumentError) Error

func (e ArgumentError) Error() string

Error matches the error interface for ArgumentError

type ForbiddenError

type ForbiddenError struct{}

ForbiddenError - 403

func NewForbiddenError

func NewForbiddenError() ForbiddenError

NewForbiddenError returns a ForbiddenError

func (ForbiddenError) Error

func (e ForbiddenError) Error() string

Error matches the error interface for ForbiddenError

type InternalError

type InternalError struct {
	// contains filtered or unexported fields
}

InternalError is an error thrown when an action causes an internal system error

func NewInternalError

func NewInternalError(s string) InternalError

NewInternalError returns an InternalError InternalServerError - 500

func (InternalError) Error

func (e InternalError) Error() string

Error matches the error interface for InternalError

type NotAuthorizedError

type NotAuthorizedError struct {
}

NotAuthorizedError is an error thrown when an action is not authorized for the current user

func NewNotAuthorizedError

func NewNotAuthorizedError() NotAuthorizedError

NewNotAuthorizedError returns a NotAuthorizedError

func (NotAuthorizedError) Error

func (e NotAuthorizedError) Error() string

Error matches the error interface for NotAuthorizedError

type RecordNotFoundError

type RecordNotFoundError struct {
}

RecordNotFoundError is an error that occurs when a record is not found in the database

func NewRecordNotFoundError

func NewRecordNotFoundError() RecordNotFoundError

NewRecordNotFoundError returns a RecordNotFoundError

func (RecordNotFoundError) Error

func (e RecordNotFoundError) Error() string

Jump to

Keyboard shortcuts

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