Documentation
¶
Index ¶
- Variables
- func Cause(err error) error
- func DisplayMessage(err error) string
- func New(msg string) error
- func Newf(msg string, args ...any) error
- func StackTrace(err error) errors.StackTrace
- func WithDisplayMessage(err error, msg string) error
- func Wrap(err error, msg string) error
- func Wrapf(err error, msg string, args ...any) error
- type ErrorCode
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Cause ¶
Cause retrives the original error Note that it will return the error created internally from github.com/pkg/errors
func DisplayMessage ¶
DisplayMessage retrives the display message
func StackTrace ¶
func StackTrace(err error) errors.StackTrace
StackTrace retrives the stack trace of an error
func WithDisplayMessage ¶
WithDisplayMessage returns a error containing a display message
Types ¶
type ErrorCode ¶
type ErrorCode string
ErrorCode holds the type of errors
const ( InternalError ErrorCode = "Internal Error" NotFound ErrorCode = "Not Found" InvalidArgument ErrorCode = "Invalid Argument" Unauthenticated ErrorCode = "Unauthenticated" PermissionDenied ErrorCode = "Permission Denied" UnprocessableContent ErrorCode = "Unprocessable Content" Unknown ErrorCode = "Unknown" )
Click to show internal directories.
Click to hide internal directories.