mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-24 12:08:19 +02:00
authorize: fix not found check (#3410)
This commit is contained in:
parent
4635509d5c
commit
493148b13f
2 changed files with 6 additions and 2 deletions
|
@ -113,3 +113,8 @@ func matchProtoMapValue(fd protoreflect.FieldDescriptor, m protoreflect.Map, que
|
|||
})
|
||||
return matches
|
||||
}
|
||||
|
||||
// IsNotFound returns true if the error is because a record was not found.
|
||||
func IsNotFound(err error) bool {
|
||||
return errors.Is(err, ErrNotFound) || status.Code(err) == codes.NotFound
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue