-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.go
51 lines (35 loc) · 2.31 KB
/
error.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//go:build !durable
package dispatch
import "github.com/dispatchrun/dispatch-go/dispatchproto"
var (
// ErrTimeout indicates an operation failed due to a timeout.
ErrTimeout error = dispatchproto.StatusError(dispatchproto.TimeoutStatus)
// ErrTimeout indicates an operation failed due to throttling.
ErrThrottled error = dispatchproto.StatusError(dispatchproto.ThrottledStatus)
// ErrInvalidArgument indicates an operation failed due to an invalid argument.
ErrInvalidArgument error = dispatchproto.StatusError(dispatchproto.InvalidArgumentStatus)
// ErrInvalidResponse indicates an operation failed due to an invalid response.
ErrInvalidResponse error = dispatchproto.StatusError(dispatchproto.InvalidResponseStatus)
// ErrTemporary indicates an operation failed with a temporary error.
ErrTemporary error = dispatchproto.StatusError(dispatchproto.TemporaryErrorStatus)
// ErrPermanent indicates an operation failed with a permanent error.
ErrPermanent error = dispatchproto.StatusError(dispatchproto.PermanentErrorStatus)
// ErrIncompatibleStatus indicates that a function's serialized state is incompatible.
ErrIncompatibleState error = dispatchproto.StatusError(dispatchproto.IncompatibleStateStatus)
// ErrDNS indicates an operation failed with a DNS error.
ErrDNS error = dispatchproto.StatusError(dispatchproto.DNSErrorStatus)
// ErrTCP indicates an operation failed with a TCP error.
ErrTCP error = dispatchproto.StatusError(dispatchproto.TCPErrorStatus)
// ErrTLS indicates an operation failed with a TLS error.
ErrTLS error = dispatchproto.StatusError(dispatchproto.TLSErrorStatus)
// ErrHTTP indicates an operation failed with a HTTP error.
ErrHTTP error = dispatchproto.StatusError(dispatchproto.HTTPErrorStatus)
// ErrUnauthenticated indicates an operation failed or was not attempted
// because the caller did not authenticate correctly.
ErrUnauthenticated error = dispatchproto.StatusError(dispatchproto.UnauthenticatedStatus)
// ErrPermissionDenied indicates an operation failed or was not attempted
// because the caller did not have permission.
ErrPermissionDenied error = dispatchproto.StatusError(dispatchproto.PermissionDeniedStatus)
// ErrNotFound indicates an operation failed because a resource could not be found.
ErrNotFound error = dispatchproto.StatusError(dispatchproto.NotFoundStatus)
)