Skip to content

db: display sql query and arguments in tests when a query fails

Administrator requested to merge asdine/better-sql-errors-in-tests into main

Created by: asdine

In tests only, when an SQL query fails, the test now displays the complete query and all of its arguments. For now, this happens regardless of the kind of error returned by the driver (i.e. even on "duplicate errors"), in the future we might want to narrow this down to only syntax errors for example. Outside of tests, the error is not wrapped and is returned as is.

Fixes #25959

Local tests: local

CI: ci

Merge request reports

Loading