Skip to content

Commit

Permalink
[ads] Return kStatementError if statement.Step() fails
Browse files Browse the repository at this point in the history
  • Loading branch information
tmancey committed Jan 13, 2025
1 parent 2279650 commit 7d39391
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/brave_ads/core/internal/database/database.cc
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@ mojom::DBTransactionResultInfo::StatusCode Database::ExecuteQueryWithBindings(
rows.push_back(std::move(row));
}

if (!statement.Succeeded()) {
VLOG(0) << "Failed to run SQL statement: " << *mojom_db_action->sql;
return mojom::DBTransactionResultInfo::StatusCode::kStatementError;
}

return mojom::DBTransactionResultInfo::StatusCode::kSuccess;
}

Expand Down

0 comments on commit 7d39391

Please sign in to comment.