2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-04-22 16:50:18 +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 29210e143c
commit 88608e770b

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")
)