Documentation ¶
Index ¶
Constants ¶
const (
ErrTemplate = "%w"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error - struct error.
Errors with status values from 4000 to 4999 are considered client errors and sent to the front ' in internal/pkg/server/delivery/handle_err.go function HandleErr. This maybe be checked with help IsErrorClient function.
Errors with status values from 5000 to 5999 are sent to the server in the same HandleErr always as internal with status = 5000.
func NewErrorBadContentRequest ¶
NewErrorBadContentRequest error with status = StatusBadContentRequest uses when user has entered incorrect data and needs to show him this error.
func NewErrorBadFormatRequest ¶
NewErrorBadFormatRequest error with status = StatusBadFormatRequest uses when get bad request from frontend and errors with this status need frontend developer.
func NewErrorCustom ¶
NewErrorCustom prefer this function to other NewError... from this package. Use this function only if you understand why.
func NewErrorInternal ¶
NewErrorInternal error with status = StatusInternalServer uses for indicates internal error status in server.