mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-01 17:37:32 +00:00
fix: token check and error unwrapping (#3648)
* fix: token check and error unwrapping * remove unused code
This commit is contained in:
@@ -38,3 +38,7 @@ func IsErrorAlreadyExists(err error) bool {
|
||||
_, ok := err.(AlreadyExists)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (err *AlreadyExistsError) Unwrap() error {
|
||||
return err.CaosError
|
||||
}
|
||||
|
||||
@@ -40,3 +40,7 @@ func (err *DeadlineExceededError) Is(target error) bool {
|
||||
}
|
||||
return err.CaosError.Is(t.CaosError)
|
||||
}
|
||||
|
||||
func (err *DeadlineExceededError) Unwrap() error {
|
||||
return err.CaosError
|
||||
}
|
||||
|
||||
@@ -40,3 +40,7 @@ func (err *InternalError) Is(target error) bool {
|
||||
}
|
||||
return err.CaosError.Is(t.CaosError)
|
||||
}
|
||||
|
||||
func (err *InternalError) Unwrap() error {
|
||||
return err.CaosError
|
||||
}
|
||||
|
||||
@@ -38,3 +38,7 @@ func (err *InvalidArgumentError) Is(target error) bool {
|
||||
}
|
||||
return err.CaosError.Is(t.CaosError)
|
||||
}
|
||||
|
||||
func (err *InvalidArgumentError) Unwrap() error {
|
||||
return err.CaosError
|
||||
}
|
||||
|
||||
@@ -33,3 +33,7 @@ func (err *NotFoundError) Is(target error) bool {
|
||||
}
|
||||
return err.CaosError.Is(t.CaosError)
|
||||
}
|
||||
|
||||
func (err *NotFoundError) Unwrap() error {
|
||||
return err.CaosError
|
||||
}
|
||||
|
||||
@@ -40,3 +40,7 @@ func (err *PermissionDeniedError) Is(target error) bool {
|
||||
}
|
||||
return err.CaosError.Is(t.CaosError)
|
||||
}
|
||||
|
||||
func (err *PermissionDeniedError) Unwrap() error {
|
||||
return err.CaosError
|
||||
}
|
||||
|
||||
@@ -40,3 +40,7 @@ func (err *PreconditionFailedError) Is(target error) bool {
|
||||
}
|
||||
return err.CaosError.Is(t.CaosError)
|
||||
}
|
||||
|
||||
func (err *PreconditionFailedError) Unwrap() error {
|
||||
return err.CaosError
|
||||
}
|
||||
|
||||
@@ -40,3 +40,7 @@ func (err *UnauthenticatedError) Is(target error) bool {
|
||||
}
|
||||
return err.CaosError.Is(t.CaosError)
|
||||
}
|
||||
|
||||
func (err *UnauthenticatedError) Unwrap() error {
|
||||
return err.CaosError
|
||||
}
|
||||
|
||||
@@ -40,3 +40,7 @@ func (err *UnavailableError) Is(target error) bool {
|
||||
}
|
||||
return err.CaosError.Is(t.CaosError)
|
||||
}
|
||||
|
||||
func (err *UnavailableError) Unwrap() error {
|
||||
return err.CaosError
|
||||
}
|
||||
|
||||
@@ -40,3 +40,7 @@ func (err *UnimplementedError) Is(target error) bool {
|
||||
}
|
||||
return err.CaosError.Is(t.CaosError)
|
||||
}
|
||||
|
||||
func (err *UnimplementedError) Unwrap() error {
|
||||
return err.CaosError
|
||||
}
|
||||
|
||||
@@ -40,3 +40,7 @@ func (err *UnknownError) Is(target error) bool {
|
||||
}
|
||||
return err.CaosError.Is(t.CaosError)
|
||||
}
|
||||
|
||||
func (err *UnknownError) Unwrap() error {
|
||||
return err.CaosError
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user