errmsgs

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DBError = core.Error{
		Status:  http.StatusInternalServerError,
		Code:    "DATABASE_ERROR",
		Message: "database internal error"}

	MQError = core.Error{
		Status:  http.StatusInternalServerError,
		Code:    "MQ_ERROR",
		Message: "mq internal error"}

	CacheError = core.Error{
		Status:  http.StatusInternalServerError,
		Code:    "CACHE_ERROR",
		Message: "cache internal error"}

	CronjobError = core.Error{
		Status:  http.StatusInternalServerError,
		Code:    "CRONJOB_ERROR",
		Message: "cronjob internal error"}

	InternalServerError = core.Error{
		Status:  http.StatusInternalServerError,
		Code:    "INTERNAL_SERVER_ERROR",
		Message: "Internal server error"}

	NotFound = core.Error{
		Status:  http.StatusNotFound,
		Code:    "NOT_FOUND",
		Message: "not found"}

	BadRequest = core.Error{
		Status:  http.StatusBadRequest,
		Code:    "BAD_REQUEST",
		Message: "bad request"}

	SignatureInValid = core.Error{
		Status:  http.StatusBadRequest,
		Code:    "INVALID_SIGNATURE",
		Message: "Signature is not valid"}

	JSONInValid = core.Error{
		Status:  http.StatusBadRequest,
		Code:    "INVALID_JSON",
		Message: "Must be json format"}
)

Functions

func IsNotFoundError

func IsNotFoundError(err core.IError) bool

func IsNotFoundErrorCode

func IsNotFoundErrorCode(code string) bool

func NotFoundCustomError

func NotFoundCustomError(key string) core.Error

Types

This section is empty.

Jump to

Keyboard shortcuts

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