ps_error

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrorCode

func IsErrorCode(err error, code ErrorCode) bool

Types

type ErrorCode

type ErrorCode int32
const (
	ErrorCodeGeneral ErrorCode = iota
	ErrorCodeValidationFailed
)

type PSError

type PSError struct {
	ErrorCode     ErrorCode `json:"errorCode"`
	Message       string    `json:"message"`
	Args          []any     `json:"args"`
	HStatus       int32
	GStatus       codes.Code
	OriginalError error
}

func ValidationErrorToPSError

func ValidationErrorToPSError(validationErrors validator.ValidationErrors) PSError

func (PSError) Error

func (e PSError) Error() string

func (PSError) ToGRPCError

func (e PSError) ToGRPCError() error

func (PSError) Unwrap

func (e PSError) Unwrap() error

Jump to

Keyboard shortcuts

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