Don't assume phone number identifier presence in parsing account JSON or writing accounts to Redis

This commit is contained in:
Katherine Yen authored and Ameya Lokare committed 2026-08-11 09:03:18 -07:00
1 parent 9870accbae
commit 8d0ea9f67a
1 file changed
+1 -1
@@ -1362,7 +1362,7 @@ public class AccountsManager extends RedisPubSubAdapter<String, String> implemen
return cacheCluster.withCluster(connection -> CompletableFuture.allOf(
account.getPhoneNumberIdentifierOptional().map(pni ->
connection.async().setex(getAccountMapKey(pni.toString()), CACHE_TTL_SECONDS, account.getAccountIdentifier().toString())
.toCompletableFuture())
.toCompletableFuture())
.orElseGet(() -> CompletableFuture.completedFuture(null)),
connection.async().setex(getAccountEntityKey(account.getAccountIdentifier()), CACHE_TTL_SECONDS, accountJson)
.toCompletableFuture()));