Fix missing risk challenge response

This commit is contained in:
richjohnrambo
2026-08-29 10:59:50 +08:00
parent 42916b85aa
commit 866222cb39
3 changed files with 34 additions and 0 deletions
+3
View File
@@ -5028,6 +5028,9 @@ func (a *adapter) riskChallengeByIDTx(ctx context.Context, q sqlx.QueryerContext
query += " FOR UPDATE"
}
if err := sqlx.GetContext(ctx, q, &row, query, challengeID); err != nil {
if err == sql.ErrNoRows {
return nil, t.ErrNotFound
}
return nil, err
}
challenge := &t.RiskChallenge{