Skip to content

Commit 98ba6fe

Browse files
Improve error message for interpolated field/2 names (#4540)
1 parent 90928ea commit 98ba6fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ecto/query/builder.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ defmodule Ecto.Query.Builder do
707707

708708
defp escape_field!(expr, field, _vars) do
709709
error!("""
710-
cannot fetch field `#{field}` from `#{Macro.to_string(expr)}`. Can only fetch fields from:
710+
cannot fetch field `#{Macro.to_string(field)}` from `#{Macro.to_string(expr)}`. Can only fetch fields from:
711711
712712
* sources, such as `p` in `from p in Post`
713713
* named bindings, such as `as(:post)` in `from Post, as: :post`

0 commit comments

Comments
 (0)