crypto/verification: include the incorrect state in non-ready error message
Some checks are pending
Go / Lint (latest) (push) Waiting to run
Go / Build (old, libolm) (push) Waiting to run
Go / Build (latest, libolm) (push) Waiting to run
Go / Build (old, goolm) (push) Waiting to run
Go / Build (latest, goolm) (push) Waiting to run

This commit is contained in:
Nick Mills-Barrett 2025-04-23 16:27:28 +01:00
commit 931f89202b
No known key found for this signature in database
GPG key ID: 31F23F2CF354937B

View file

@ -46,7 +46,7 @@ func (vh *VerificationHelper) StartSAS(ctx context.Context, txnID id.Verificatio
if err != nil {
return fmt.Errorf("failed to get verification transaction %s: %w", txnID, err)
} else if txn.VerificationState != VerificationStateReady {
return errors.New("transaction is not in ready state")
return fmt.Errorf("transaction is not in ready state: %s", txn.VerificationState.String())
} else if txn.StartEventContent != nil {
return errors.New("start event already sent or received")
}