Skip to content

Commit 2189a83

Browse files
committed
fix rebase
1 parent 05147d2 commit 2189a83

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/phoenix/sync/predefined_shape.ex

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ defmodule Phoenix.Sync.PredefinedShape do
160160
# we resolve the query at runtime to avoid compile-time dependencies in
161161
# router modules
162162
defp to_shape_definition(%__MODULE__{query: queryable, shape_config: shape_config}) do
163-
Electric.Client.EctoAdapter.shape!(queryable, shape_config)
163+
try do
164+
Electric.Client.EctoAdapter.shape!(queryable, shape_config)
165+
rescue
166+
e in Protocol.UndefinedError ->
167+
raise ArgumentError,
168+
message: "Invalid query `#{inspect(queryable)}`: #{e.description}"
169+
end
164170
end
165171
end

0 commit comments

Comments
 (0)