errors.go 401 B

12345678910111213
  1. package v1
  2. var (
  3. // common errors
  4. ErrSuccess = newError(0, "ok")
  5. ErrBadRequest = newError(400, "Bad Request")
  6. ErrUnauthorized = newError(401, "Unauthorized")
  7. ErrNotFound = newError(404, "Not Found")
  8. ErrInternalServerError = newError(500, "Internal Server Error")
  9. // more biz errors
  10. ErrEmailAlreadyUse = newError(1001, "The email is already in use.")
  11. )