diff --git a/CHANGELOG.md b/CHANGELOG.md index 145fab4..983ce68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ * 2.6.next in progress * Address [#527](https://github.com/seancorfield/honeysql/issues/527) by adding tests and more documentation for `:composite`. * Add example of mixed `DO UPDATE SET` with `EXCLUDED` and regular SQL expressions. + * Improve exception message when un-`lift`-ed JSON expressions are used in the DSL. * Update Clojure versions (to 1.11.2 and 1.12.0-alpha9); update other dev/test dependencies. * 2.6.1126 -- 2024-03-04 diff --git a/src/honey/sql.cljc b/src/honey/sql.cljc index 1d09d33..d528fe6 100644 --- a/src/honey/sql.cljc +++ b/src/honey/sql.cljc @@ -1576,7 +1576,10 @@ *clause-order*)] (if (seq leftover) (throw (ex-info (str "These SQL clauses are unknown or have nil values: " - (str/join ", " (keys leftover))) + (str/join ", " (keys leftover)) + "(perhaps you need [:lift {" + (first (keys leftover)) + " ...}] here?)") leftover)) (into [(cond-> (str/join (if pretty "\n" " ") (filter seq sqls)) pretty