Files
nunu-layout-advanced/internal/pkg/response/errors.go
2023-08-26 12:18:01 +08:00

14 lines
413 B
Go

package response
var (
// common errors
ErrSuccess = newError(0, "ok")
ErrBadRequest = newError(400, "Bad Request")
ErrUnauthorized = newError(401, "Unauthorized")
ErrNotFound = newError(404, "Not Found")
ErrInternalServerError = newError(500, "Internal Server Error")
// more biz errors
ErrUsernameAlreadyUse = newError(1001, "The username is already in use.")
)