hey I’m trying to use delete_all like the code below
def delete_users(queryable) do
Ecto.Multi.new()
|> Ecto.Multi.delete_all(:delete_all, queryable)
|> Phoenixbasic.Repo.transaction()
end
but I get an error like this, what does this error mean? what’s the solution?
error] #PID<0.1611.0> running PhoenixbasicWeb.Endpoint (connection #PID<0.1610.0>, stream id 1) terminated
Server: localhost:4000 (http)
Request: DELETE /deleteall
** (exit) an exception was raised:
** (UnicodeConversionError) invalid encoding starting at <<136, 19, 67, 176, 185, 78, 69, 201, 128, 173, 91, 9, 44, 56, 182, 179, 38, 35, 51, 57, 59, 41, 60, 47, 112, 62, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32>>
(elixir 1.10.3) lib/list.ex:944: List.to_string/1
(plug 1.10.0) Plug.Debugger.template_html/1
(plug 1.10.0) lib/plug/debugger.ex:207: Plug.Debugger.render/6
(plug 1.10.0) lib/plug/debugger.ex:158: Plug.Debugger.__catch__/5
(phoenixbasic 0.1.0) lib/phoenixbasic_web/endpoint.ex:1: PhoenixbasicWeb.Endpoint.call/2
(phoenix 1.5.1) lib/phoenix/endpoint/cowboy2_handler.ex:64: Phoenix.Endpoint.Cowboy2Handler.init/4
(cowboy 2.7.0) /home/wahyu/phoenixbasic/deps/cowboy/src/cowboy_handler.erl:41: :cowboy_handler.execute/2
(cowboy 2.7.0) /home/wahyu/phoenixbasic/deps/cowboy/src/cowboy_stream_h.erl:320: :cowboy_stream_h.execute/3
(cowboy 2.7.0) /home/wahyu/phoenixbasic/deps/cowboy/src/cowboy_stream_h.erl:302: :cowboy_stream_h.request_process/3
(stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3