mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 08:58:13 +01:00
Check length of cancellation reason list before getting reason codes
This commit is contained in:
@@ -387,7 +387,7 @@ public class Accounts extends AbstractDynamoDbStore {
|
||||
|
||||
} catch (final TransactionCanceledException e) {
|
||||
|
||||
if ("ConditionalCheckFailed".equals(e.cancellationReasons().get(1).code())) {
|
||||
if (e.cancellationReasons().size() > 1 && "ConditionalCheckFailed".equals(e.cancellationReasons().get(1).code())) {
|
||||
log.error("Conflicting phone number mapping exists for account {}, PNI {}", account.getUuid(), account.getPhoneNumberIdentifier());
|
||||
throw e;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user