common

package
v0.0.0-...-e7c2cf1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUniqueConstraint23505 = &sentinelAPIError{status: http.StatusUnprocessableEntity, msg: "already created"}
	ErrRefNotFound23503      = &sentinelAPIError{status: http.StatusUnprocessableEntity, msg: "reference not found"}
	ErrNotMatchCredential    = &sentinelAPIError{status: http.StatusUnauthorized, msg: "invalid credentials"}
	ErrTooLongAccessingDB    = &sentinelAPIError{status: http.StatusConflict, msg: "request conflicted, please try again"}
	ErrResourceNotFound      = &sentinelAPIError{status: http.StatusNotFound, msg: "resource not found"}
)
View Source
var (
	ErrAuthorNotValid    = errors.New("author not in the conversation")
	ErrMaxProfilePicture = errors.New("excedeed profile picture constraint")
)

Functions

func WrapError

func WrapError(err error, sentinel *sentinelAPIError) error

func WrapErrorWithMsg

func WrapErrorWithMsg(err error, sentinel *sentinelAPIError, msg string) error

func WrapWithNewError

func WrapWithNewError(err error, status int, msg string) error

Types

type APIError

type APIError interface {
	APIError() (int, string)
}

Jump to

Keyboard shortcuts

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