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)}"
Copy file name to clipboardExpand all lines: test/integration/rt_channel_test.exs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,7 @@ defmodule Realtime.Integration.RtChannelTest do
100
100
"channel"=>"any",
101
101
"extension"=>"postgres_changes",
102
102
"message"=>
103
-
"{:error, \"Unable to subscribe to changes with given parameters. Please check Realtime is enabled for the given connect parameters: [schema: public, table: *, filters: []]\"}",
103
+
"Unable to subscribe to changes with given parameters. Please check Realtime is enabled for the given connect parameters: [schema: public, table: *, filters: []]",
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
+
5000
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