Documentation ¶
Index ¶
Constants ¶
View Source
const ( // HTTPErrorTypeGeneric represents the generic error type returned as default for all HTTP errors without a type defined. HTTPErrorTypeGeneric string = "generic" )
Variables ¶
View Source
var ( ErrBadRequestInvalidPassword = NewHTTPErrorWithDetail(http.StatusBadRequest, "INVALID_PASSWORD", "The password provided was invalid", "Password was either too weak or did not match other criteria") ErrForbiddenNotLocalUser = NewHTTPError(http.StatusForbidden, "NOT_LOCAL_USER", "User account is not valid for local authentication") ErrNotFoundTokenNotFound = NewHTTPError(http.StatusNotFound, "TOKEN_NOT_FOUND", "Provided token was not found") ErrConflictTokenExpired = NewHTTPError(http.StatusConflict, "TOKEN_EXPIRED", "Provided token has expired and is no longer valid") ErrConflictUserAlreadyExists = NewHTTPError(http.StatusConflict, "USER_ALREADY_EXISTS", "User with given username already exists") )
View Source
var ( ErrConflictPushToken = NewHTTPError(http.StatusConflict, "PUSH_TOKEN_ALREADY_EXISTS", "The given token already exists.") ErrNotFoundOldPushToken = NewHTTPError(http.StatusNotFound, "OLD_PUSH_TOKEN_NOT_FOUND", "The old push token does not exists. The new token was saved.") )
Functions ¶
This section is empty.
Types ¶
type HTTPError ¶
type HTTPError struct { types.PublicHTTPError Internal error `json:"-"` AdditionalData map[string]interface{} `json:"-"` }
func NewHTTPErrorWithDetail ¶
type HTTPValidationError ¶
type HTTPValidationError struct { types.PublicHTTPValidationError Internal error `json:"-"` AdditionalData map[string]interface{} `json:"-"` }
func NewHTTPValidationError ¶
func NewHTTPValidationError(code int, errorType string, title string, validationErrors []*types.HTTPValidationErrorDetail) *HTTPValidationError
func NewHTTPValidationErrorWithDetail ¶
func NewHTTPValidationErrorWithDetail(code int, errorType string, title string, validationErrors []*types.HTTPValidationErrorDetail, detail string) *HTTPValidationError
func (*HTTPValidationError) Error ¶
func (e *HTTPValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.