This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package errors
|
||||
|
||||
type Kind string
|
||||
|
||||
const (
|
||||
Rejected Kind = "REJECTED"
|
||||
Failed Kind = "FAILED"
|
||||
UnknownOutcome Kind = "UNKNOWN_OUTCOME"
|
||||
TemporarilyUnavailable Kind = "TEMPORARILY_UNAVAILABLE"
|
||||
Conflict Kind = "CONFLICT"
|
||||
Stale Kind = "STALE"
|
||||
Unauthorized Kind = "UNAUTHORIZED"
|
||||
Unsupported Kind = "UNSUPPORTED"
|
||||
)
|
||||
|
||||
type Error struct {
|
||||
Kind Kind
|
||||
Code string
|
||||
Message string
|
||||
}
|
||||
|
||||
func (e Error) Error() string { return e.Message }
|
||||
Reference in New Issue
Block a user