1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-08 02:29:28 +00:00

Add unauthorized error check

This commit is contained in:
rmweir
2019-11-11 17:43:25 -07:00
parent 1fcac7eb4f
commit 5af9463892

View File

@@ -120,3 +120,10 @@ func IsConflict(err error) bool {
return false
}
func IsForbidden(err error) bool {
if apiError, ok := err.(*APIError); ok {
return apiError.Code.Status == 403
}
return false
}