package
1.0.3
Repository: https://github.com/manigandand/adk.git
Documentation: pkg.go.dev

# README

errors - apperrors

Custom app errors has support for github.com/pkg/errors.

# Functions

BadRequest will return `http.StatusBadRequest` with custom message.
Conflict will return `http.StatusConflict` with custom message.
Errorf github.com/pkg/errors wraper Errorf formats according to a format specifier and returns the string as a value that satisfies error.
Forbidden will return `http.StatusForbidden` with custom message.
Gone will return `http.StatusGone` with custom message.
InternalServer will return `http.StatusInternalServerError` with custom message.
InternalServerStd will return `http.StatusInternalServerError` with static message.
InvalidKey returns new error with custom error message.
KeyRequired returns new error with custom error message.
New github.com/pkg/errors wraper New returns an error with the supplied message.
NewAppError returns the new apperror object.
NotFound will return `http.StatusNotFound` with custom message.
PaymentRequired will return `http.StatusPaymentRequired` with custom message.
TooEarly will return `http.StatusTooEarly` with custom message.
TooManyRequests will return `http.StatusTooManyRequests` with custom message.
Unauthorized will return `http.StatusUnauthorized` with custom message.
UnprocessableEntity will return `http.StatusUnprocessableEntity` with custom message.
Wrap github.com/pkg/errors.Wrap Wrap returns an error annotating err with a stack trace at the point Wrap is called, and the supplied message.
Wrapf github.com/pkg/errors.Wrapf Wrapf returns an error annotating err with a stack trace at the point Wrapf is called, and the format specifier.

# Constants

MaxStackTraceLimit allows to print only max 5 frames.

# Variables

All the defined Internal ErrorCodes.

# Structs

AppError struct holds the value of HTTP status code and custom error message.
Details struct contains the application logic specific internal error codes, readable message and a link to a support doc.
ErrorCode is a enum type where all the platform error codes are defined.