errors

package
v1.0.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidMessageFormatCode   = "INVALID_MESSAGE_FORMAT"
	EncodingFormatNotSupported = "ENCODING_FORMAT_NOT_SUPPORTED"
	UnKnownError               = "UNKNOWN_ERROR"
)

Variables

View Source
var (
	// ErrInvalidMessageFormat is an error that occurs when attempting to unmarshal a message with an invalid format.
	ErrInvalidMessageFormat = Error{
		Code:    InvalidMessageFormatCode,
		Message: "failed to unmarshal the message, removing the message due to wrong message format"}
	// ErrEncodingFormatNotSupported is an error that indicates the encoding format is not supported.
	ErrEncodingFormatNotSupported = Error{
		Code:    EncodingFormatNotSupported,
		Message: "encoding format not supported. Please register the encoding format before using it"}

	// ErrUnknownError is an error that indicates an unknown error occurred.
	ErrUnknownError = Error{
		Code:    UnKnownError,
		Message: "an unknown error occurred"}
)

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

Error represents an error with a code and a message.

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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