errors

package
v0.0.0-...-a1ddd4b Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BusinessErrorToGRPCStatus

func BusinessErrorToGRPCStatus(err *businessError) *status.Status

BusinessErrorToGRPCStatus converts businessError to gRPC status

func GetBusinessError

func GetBusinessError(err error) *businessError

GetBusinessError returns businessError if err is a business error, nil otherwise

func NewInvalidArgumentError

func NewInvalidArgumentError(err error) *businessError

func NewNotFoundError

func NewNotFoundError(err error) *businessError

Constructor functions for different error types

Types

type ErrorCode

type ErrorCode int64

ErrorCode represents business error codes

const (
	NotFoundErrCode ErrorCode = iota
	InvalidArgumentErrCode
)

Jump to

Keyboard shortcuts

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