Documentation ¶
Index ¶
- Variables
- func IsErrAlreadyExists(err error) bool
- func IsErrForbidden(err error) bool
- func IsErrInsufficientBalance(err error) bool
- func IsErrInvalidDestination(err error) bool
- func IsErrInvalidSignature(err error) bool
- func IsErrNotFound(err error) bool
- func IsErrUnauthorized(err error) bool
- func New(cause error, message string, data interface{}) error
- func Wrap(cause error, message string) error
- type Codified
- type DrainCodified
- type ErrorBundle
- type MultiError
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidCountry - invalid country error for validation ErrInvalidCountry = errors.New("invalid country") // ErrNoIdentityCountry - no specified identity country ErrNoIdentityCountry = errors.New("no identity country") // ErrConflictBAPReportEvent is an error created when trying to update a bat loss event with a different amount ErrConflictBAPReportEvent = errors.New("unable to record BAP report") // ErrConflictBATLossEvent is an error created when trying to update a bat loss event with a different amount ErrConflictBATLossEvent = errors.New("unable to update bat loss events") // ErrCertificateExpired - a certificate is expired ErrCertificateExpired = errors.New("certificate expired") // ErrMarshalTransferRequest - failed to marshal the transfer request ErrMarshalTransferRequest = errors.New("failed to marshal the transfer request") // ErrCreateTransferRequest - failed to create the transfer request ErrCreateTransferRequest = errors.New("failed to create the transfer request") // ErrSignTransferRequest - failed to sign the transfer request ErrSignTransferRequest = errors.New("failed to sign the transfer request") // ErrFailedClientRequest - failed to perform client request ErrFailedClientRequest = errors.New("failed to perform api request") // ErrFailedBodyRead - failed to read body ErrFailedBodyRead = errors.New("failed to read the transfer response") // ErrFailedBodyUnmarshal - failed to decode body ErrFailedBodyUnmarshal = errors.New("failed to unmarshal the transfer response") // ErrMissingWallet - missing wallet ErrMissingWallet = errors.New("missing wallet") // ErrNoDepositProviderDestination - no linked wallet ErrNoDepositProviderDestination = errors.New("no deposit provider destination for wallet for transfer") // ErrNotImplemented - this function is not yet implemented ErrNotImplemented = errors.New("this function is not yet implemented") // ErrNotFound - resource not found ErrNotFound = errors.New("not found") // ErrInternalServerError internal server error ErrInternalServerError = errors.New("server encountered an internal error and was unable to complete the request") // ErrBadRequest bad request error ErrBadRequest = errors.New("error bad request") )
Functions ¶
func IsErrAlreadyExists ¶
IsErrAlreadyExists is a helper method for determining if an error indicates the resource already exists
func IsErrForbidden ¶
IsErrForbidden is a helper method for determining if an error indicates the action is forbidden
func IsErrInsufficientBalance ¶
IsErrInsufficientBalance is a helper method for determining if an error indicates insufficient balance
func IsErrInvalidDestination ¶
IsErrInvalidDestination is a helper method for determining if an error indicates an invalid destination
func IsErrInvalidSignature ¶
IsErrInvalidSignature is a helper method for determining if an error indicates there was an invalid signature
func IsErrNotFound ¶
IsErrNotFound is a helper method for determining if an error indicates a missing resource
func IsErrUnauthorized ¶
IsErrUnauthorized is a helper method for determining if an error indicates the wallet unauthorized
Types ¶
type DrainCodified ¶
type DrainCodified interface { // DrainCode - get the drain code from the interface implementation DrainCode() (string, bool) }
DrainCodified - Job runner drain codified errors have DrainCode()
type ErrorBundle ¶
type ErrorBundle struct {
// contains filtered or unexported fields
}
ErrorBundle creates a new response error
func (ErrorBundle) DataToString ¶
func (e ErrorBundle) DataToString() string
DataToString returns string representation of data
type MultiError ¶
type MultiError struct {
Errs []error
}
MultiError - allows for multiple errors, not necessarily chained
func (*MultiError) Append ¶
func (me *MultiError) Append(err ...error)
Append - append new errors to this multierror
func (*MultiError) Count ¶
func (me *MultiError) Count() int
Count - get the number of errors contained herein
func (*MultiError) Unwrap ¶
func (me *MultiError) Unwrap() error
Unwrap - implement Unwrap for unwrapping sub errors