serrors

package
v0.0.0-...-e0046dd Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package serrors contains all custom error types

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadySet = fmt.Errorf("value already set")

ErrAlreadySet is a custom error when a value is already set and cannot be overwritten

View Source
var ErrAtLeastOne = fmt.Errorf("at least one value is required")

ErrAtLeastOne is a custom error when a slice requires at least one entry this error may be returned when at least filter is required for a query

View Source
var ErrDependencyMissing = fmt.Errorf("required dependency failed")

ErrDependencyMissing is the error when a dependency fails to create

View Source
var ErrEmptyEnum = fmt.Errorf("unknown not allowed")

ErrEmptyEnum is a custom error when an enum value is the zero value this error is generally returned when an enum provided is that enum zero value and not allowed

View Source
var ErrEmptyString = fmt.Errorf("string cannot be empty")

ErrEmptyString is a custom error when an empty string is passed and is not valid this error is generally returned when a string parameter cannot be empty

View Source
var ErrInUse = fmt.Errorf("in use")

ErrInUse is a custom error when a resource is in use this error is generally returned when attempting to delete a Status entry when it is in use by an Item

View Source
var ErrInvalidData = fmt.Errorf("invalid data")

ErrInvalidData is a custom error when data is in a corrupt state this error is generally returned when data is a store is invalid or corrupt for some reason this should be treated with urgency

View Source
var ErrInvalidPassword = fmt.Errorf("invalid password")

ErrInvalidPassword is the error when a password is invalid

View Source
var ErrMissingCredentials = fmt.Errorf("missing credentials")

ErrMissingCredentials is the error when something expects credentials (i.e. a database connection string or api call)

View Source
var ErrMissingTimestamp = fmt.Errorf("timestamp required")

ErrMissingTimestamp is the error when a Timestamp specific field is required

View Source
var ErrNilVal = fmt.Errorf("nil not allowed")

ErrNilVal is a custom error when a nil value is not allowed this error is generally returned when a function disallows a nil value

View Source
var ErrNotFound = fmt.Errorf("not found")

ErrNotFound is a custom error when a value is not found this error is generally returned when the system is unable to find some resource

View Source
var ErrNotImplemented = fmt.Errorf("not implemented")

ErrNotImplemented is a custom error when an interface function has not been implemented

View Source
var ErrStoreUnavailable = fmt.Errorf("store unavailable")

ErrStoreUnavailable is a custom error when a store is unavailable this error is generally returned when a data store is not available at request time

View Source
var ErrUnexpectedRows = fmt.Errorf("unexpected rows affect")

ErrUnexpectedRows is the error when a db query affects more rows than expected

View Source
var ErrUnrecoverable = fmt.Errorf("unrecoverable")

ErrUnrecoverable is the error when something has ABENDed in an unsafe to continue way

Functions

func NewError

func NewError(field string, err error) error

NewError returns a statusthing specific error with a consistent error message

func NewWrappedError

func NewWrappedError(field string, statusThingErr error, originalErr error) error

NewWrappedError returns an serror wrapping an original error

Types

This section is empty.

Jump to

Keyboard shortcuts

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