mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 09:36:53 +00:00
Check length of cancellation reason list before getting reason codes
This commit is contained in:
1 parent
bae0196bcf
commit
1e1394560d
2 files changed
+25
-1
No files matched your search
@@ -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