Skip to content

errors

import "github.com/Mini-Vending/go-services/packages/errors"

Index

Variables

var (
    ErrUserAlreadyExists    = errors.New("user already exists")
    ErrInvalidCredentials   = errors.New("invalid credentials")
    ErrAccountNotActive     = errors.New("account is not active")
    ErrUserNotFound         = errors.New("account not found")
    ErrUnauthenticated      = errors.New("unauthenticated")
    ErrProductNotFound      = errors.New("product not found")
    ErrModelNotFound        = errors.New("model not found")
    ErrModelAlreadyExists   = errors.New("model already exists")
    ErrVendingNotFound      = errors.New("vending not found")
    ErrVendingPlaceNotFound = errors.New("vending place not found")
    ErrVendingPlaceNotFree  = errors.New("vending place is not free")

    GrpcErrInvalidArgument         = status.Error(codes.InvalidArgument, "invalid argument")
    GrpcErrUserAlreadyExists       = status.Error(codes.AlreadyExists, "user already exists")
    GrpcErrInternal                = status.Error(codes.Internal, "internal server error")
    GrpcErrInsufficientPermissions = status.Error(codes.PermissionDenied, "insufficient permissions")
    GrpcErrInvalidCredentials      = status.Error(codes.Unauthenticated, "invalid credentials")
    GrpcErrAccountNotActive        = status.Error(codes.Unauthenticated, "account is not active")
    GrpcErrUserNotFound            = status.Error(codes.NotFound, "account not found")
    GrpcErrUnauthenticated         = status.Error(codes.Unauthenticated, "unauthenticated")
    GrpcErrProductNotFound         = status.Error(codes.NotFound, "product not found")
    GrpcErrModelNotFound           = status.Error(codes.NotFound, "model not found")
    GrpcErrVendingNotFound         = status.Error(codes.NotFound, "vending not found")
    GrpcErrModelAlreadyExists      = status.Error(codes.AlreadyExists, "model already exists")
)

Generated by gomarkdoc