Fix jwt and PAT not found
[ZITADOPER-1]
This commit is contained in:
@@ -189,7 +189,7 @@ func (wr *wrappedMachineUserReconciler) reconcilePAT(ctx context.Context, ztdCli
|
|||||||
TokenId: wr.MachineUser.Status.PATId,
|
TokenId: wr.MachineUser.Status.PATId,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if !(strings.Contains(err.Error(), "not found") || strings.Contains(err.Error(), "length must be between 1 and 200 runes")) {
|
if !(strings.Contains(err.Error(), "NotFound") || strings.Contains(err.Error(), "length must be between 1 and 200 runes")) {
|
||||||
return fmt.Errorf("Error getting PAT: %v", err)
|
return fmt.Errorf("Error getting PAT: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -267,7 +267,7 @@ func (wr *wrappedMachineUserReconciler) reconcileJWT(ctx context.Context, ztdCli
|
|||||||
KeyId: wr.MachineUser.Status.KeyId,
|
KeyId: wr.MachineUser.Status.KeyId,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if !(strings.Contains(err.Error(), "not found") || strings.Contains(err.Error(), "length must be between 1 and 200 runes")) {
|
if !(strings.Contains(err.Error(), "NotFound") || strings.Contains(err.Error(), "length must be between 1 and 200 runes")) {
|
||||||
return fmt.Errorf("Error getting JWT: %v", err)
|
return fmt.Errorf("Error getting JWT: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user