2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-09-20 11:05:58 +08:00

Add a list of canonical errors in base package

This commit is contained in:
Ken Hibino 2021-05-01 06:38:33 -07:00
parent cb5bdf245c
commit 1db516c53c

View File

@ -7,6 +7,7 @@ package base
import ( import (
"context" "context"
"errors"
"fmt" "fmt"
"sync" "sync"
"time" "time"
@ -589,3 +590,10 @@ type Broker interface {
PublishCancelation(id string) error PublishCancelation(id string) error
Close() error Close() error
} }
// List of canonical errors.
var (
ErrNotFound = errors.New("not found")
ErrFailedPrecondition = errors.New("failed precondition")
ErrInternal = errors.New("internal error")
)