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