Check that the returned resources before referencing them (#2612)
This commit is contained in:
1 parent
4509981e5b
commit
426e6aaa79
4 files changed
+171
-21
No files matched your search
@@ -230,9 +230,9 @@ func Callback(
|
||||
return "", errors.Wrap(ctx, err, op)
|
||||
}
|
||||
|
||||
scope, err := iamRepo.LookupScope(ctx, am.ScopeId)
|
||||
_, err = iamRepo.LookupScope(ctx, am.ScopeId)
|
||||
if err != nil {
|
||||
return "", errors.Wrap(ctx, err, op, errors.WithMsg("unable to lookup account scope: "+scope.PublicId))
|
||||
return "", errors.Wrap(ctx, err, op, errors.WithMsg("unable to lookup account scope: "+am.ScopeId))
|
||||
}
|
||||
|
||||
user, err := iamRepo.LookupUserWithLogin(ctx, acct.PublicId)
|
||||
|
||||
Reference in new issue
Block a user