errors

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultErrRowScanPrefix = "number of field descriptions must equal number of"

DefaultErrRowScanPrefix is prefix for row scan errors, using in this project for wrapping QueryRow func

Variables

View Source
var (
	// Validation Error
	ErrInvalidUUID  = errors.New("invalid UUID: ")
	ErrInvalidEmail = errors.New("invalid email: ")

	// Database Errors
	ErrUserNotFound              = errors.New("user not found")
	ErrUserAlreadyExists         = errors.New("user already exists")
	ErrSubscriptionAlreadyExists = errors.New("subscription already exists")
	ErrForeignKeyViolation       = errors.New("foreign key violation")
	ErrNotNullViolation          = errors.New("not null violation")
	ErrCheckViolation            = errors.New("check violation")
	ErrUndefinedTable            = errors.New("undefined table")
	ErrUndefinedColumn           = errors.New("undefined column")
	ErrInvalidTextRepresentation = errors.New("invalid text representation")
	ErrSyntaxError               = errors.New("syntax error")

	// SQL Error
	ErrRowScanNotMatch = errors.New("number of field descriptions do not match amount of parameters")
)

Functions

func ConvertPgError

func ConvertPgError(err error) error

func ToGrpcError

func ToGrpcError(err error) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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