Documentation ¶
Overview ¶
error package for killoj
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // 400xx : bad request ErrBadRequestGeneral = ErrResponse{http.StatusBadRequest, 40000, tip.BadRequestGeneralTip, nil} ErrArgValidateFail = ErrResponse{http.StatusBadRequest, 40001, tip.ArgValidateFailTip, nil} ErrNotExist = ErrResponse{http.StatusBadRequest, 40002, tip.NotExistTip, nil} ErrAlreadyExist = ErrResponse{http.StatusBadRequest, 40003, tip.AlreadyExistTip, nil} ErrShouldBothExistOrNot = ErrResponse{http.StatusBadRequest, 40004, tip.ShouldBothExistOrNotTip, nil} ErrShouldNotUpdateSelf = ErrResponse{http.StatusBadRequest, 40005, tip.ShouldNotUpdateSelfTip, nil} ErrAlreadyInvite = ErrResponse{http.StatusBadRequest, 40006, tip.AlreadyInviteTip, nil} ErrAlreadyFinished = ErrResponse{http.StatusBadRequest, 40007, tip.AlreadyFinishTip, nil} ErrMustProvideWhenAnotherExist = ErrResponse{http.StatusBadRequest, 40008, tip.MustProvideWhenAnotherExistTip, nil} ErrNotComplete = ErrResponse{http.StatusBadRequest, 40009, tip.TaskNotCompleteTip, nil} ErrAtLeast = ErrResponse{http.StatusBadRequest, 40010, tip.AtLeastTip, nil} ErrHaveRunningTask = ErrResponse{http.StatusBadRequest, 40011, tip.HaveRunningTaskTip, nil} // 401xx: ErrUserNotExist = ErrResponse{http.StatusUnauthorized, 40101, tip.UserNotExistTip, nil} ErrPasswordWrong = ErrResponse{http.StatusUnauthorized, 40102, tip.PasswordWrong, nil} Err3rdAuthFail = ErrResponse{http.StatusUnauthorized, 40103, tip.ThirdAuthFailTip, nil} ErrNoSignUp = ErrResponse{http.StatusUnauthorized, 40104, tip.NoSignupTip, nil} ErrNotSupportProvider = ErrResponse{http.StatusUnauthorized, 40105, tip.NotSupportProviderTip, nil} // 403xx : forbidden ErrForbiddenGeneral = ErrResponse{http.StatusForbidden, 40300, tip.ForbiddenTip, nil} // 404xx : not found ErrNotFoundGeneral = ErrResponse{http.StatusNotFound, 40400, tip.NotFoundTip, nil} ErrNotFound = ErrResponse{http.StatusNotFound, 40401, tip.NotExistTip, nil} ErrNotFoundOrOutOfDate = ErrResponse{http.StatusNotFound, 40401, tip.NotExistOrOutOfDateTip, nil} // 500xx: Internal Server Error ErrInternalServerErrorGeneral = ErrResponse{http.StatusInternalServerError, 50000, tip.InternalServerErrorTip, nil} )
View Source
var (
EmptyError = errors.New("") // error variable with empty message
)
Functions ¶
This section is empty.
Types ¶
type ErrResponse ¶
func (ErrResponse) MarshalJSON ¶
func (r ErrResponse) MarshalJSON() ([]byte, error)
func (ErrResponse) WithArgs ¶
func (r ErrResponse) WithArgs(args ...interface{}) ErrResponse
todo there may be a bug here, when call With before WithArgs
Click to show internal directories.
Click to hide internal directories.