You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -63,16 +64,20 @@ defmodule Extensions.PostgresCdcRls.Subscriptions do
63
64
msg=
64
65
"Unable to subscribe to changes with given parameters. Please check Realtime is enabled for the given connect parameters: [#{params_to_log(params)}]"
65
66
66
-
rollback(conn,msg)
67
+
rollback(conn,{:subscription_insert_failed,msg})
67
68
68
69
{:error,exception}->
69
70
msg=
70
71
"Unable to subscribe to changes with given parameters. An exception happened so please check your connect parameters: [#{params_to_log(params)}]. Exception: #{Exception.message(exception)}"
Postgrex.query!(conn,"drop publication if exists supabase_realtime_test",[])
53
+
54
+
assert{:error,
55
+
{:subscription_insert_failed,
56
+
"Unable to subscribe to changes with given parameters. Please check Realtime is enabled for the given connect parameters: [schema: public, table: test, filters: []]"}}=
"Unable to subscribe to changes with given parameters. Please check Realtime is enabled for the given connect parameters: [schema: public, table: doesnotexist, filters: []]"}}=
"Unable to subscribe to changes with given parameters. An exception happened so please check your connect parameters: [schema: public, table: test, filters: [{\"subject\", \"eq\", \"hey\"}]]. Exception: ERROR P0001 (raise_exception) invalid column for filter subject"}=
87
+
{:subscription_insert_failed,
88
+
"Unable to subscribe to changes with given parameters. An exception happened so please check your connect parameters: [schema: public, table: test, filters: [{\"subject\", \"eq\", \"hey\"}]]. Exception: ERROR P0001 (raise_exception) invalid column for filter subject"}}=
"Unable to subscribe to changes with given parameters. An exception happened so please check your connect parameters: [schema: public, table: test, filters: [{\"id\", \"eq\", \"hey\"}]]. Exception: ERROR 22P02 (invalid_text_representation) invalid input syntax for type integer: \"hey\""}=
105
+
{:subscription_insert_failed,
106
+
"Unable to subscribe to changes with given parameters. An exception happened so please check your connect parameters: [schema: public, table: test, filters: [{\"id\", \"eq\", \"hey\"}]]. Exception: ERROR 22P02 (invalid_text_representation) invalid input syntax for type integer: \"hey\""}}=
"Unable to subscribe to changes with given parameters. Please check Realtime is enabled for the given connect parameters: [schema: public, table: doesnotexist, filters: []]",
141
+
status: "error",
142
+
extension: "postgres_changes",
143
+
channel: "test"
144
+
},
145
+
3000
146
+
147
+
socket=Server.socket(socket.channel_pid)
148
+
149
+
# It won't re-subscribe
150
+
assertsocket.assigns.pg_sub_ref==nil
151
+
end
152
+
153
+
test"invalid subscription column does not exist",%{tenant: tenant}do
"Unable to subscribe to changes with given parameters. An exception happened so please check your connect parameters: [schema: public, table: test, filters: [{\"notacolumn\", \"eq\", \"123\"}]]. Exception: ERROR P0001 (raise_exception) invalid column for filter notacolumn",
0 commit comments