Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Generic error Generic = NewStatus(http.StatusInternalServerError) // DB represents database related errors DB = NewStatus(http.StatusInternalServerError) // Forbidden represents access to forbidden resource error Forbidden = NewStatus(http.StatusForbidden) // BadRequest represents error for bad requests BadRequest = NewStatus(http.StatusBadRequest) // NotFound represents errors for not found resources NotFound = NewStatus(http.StatusNotFound) Unauthorized = NewStatus(http.StatusUnauthorized) )
Functions ¶
Types ¶
type APPError ¶
type APPError struct { // HTTP Status code to be set in response Status int `json:"-"` // Message is the error message that may be displayed to end users Message string `json:"message,omitempty"` }
APPError is the default error struct containing detailed information about the error
Click to show internal directories.
Click to hide internal directories.