package grpc import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) var ( // Authentication errors ErrUnauthorized = status.Error(codes.Unauthenticated, "unauthorized: missing or invalid token") ErrInvalidToken = status.Error(codes.Unauthenticated, "invalid token") // Channel errors ErrChannelNotFound = status.Error(codes.NotFound, "channel not found") ErrChannelAlreadyExists = status.Error(codes.AlreadyExists, "channel already exists") ErrChannelFull = status.Error(codes.ResourceExhausted, "channel is full") ErrInvalidChannelName = status.Error(codes.InvalidArgument, "invalid channel name") ErrInvalidChannel = status.Error(codes.InvalidArgument, "invalid channel id") ErrUserNotInChannel = status.Error(codes.NotFound, "user not in channel") // User errors ErrUserNotFound = status.Error(codes.NotFound, "user not found") ErrInvalidUser = status.Error(codes.InvalidArgument, "invalid user id") // General errors ErrNotImplemented = status.Error(codes.Unimplemented, "method not implemented") ErrInternal = status.Error(codes.Internal, "internal server error") )