How to debug, in general, an error stack like this one (bellow) ?
It’s mixed with errors coming from the Erlang dependencies. Notice it doesn’t point to a certain line of my (Elixir) code.
Where to start from, what is the error source, error initiator, errors flow? How to read it, from bottom to top or top to bottom?
[error] Ranch listener "qwerty" had connection process started with :cowboy_clear:start_link/4 at #PID<0.489.0> exit with reason:
{
:badarg,
[
{
:erlang,
:iolist_size,
[
{
:EXIT, #PID<0.487.0>,
:shutdown
}
],
[error_info: %{module: :erl_erts_errors
}
]
},
{
:cow_ws,
:payload_length,
1,
[file: '.../deps/cowlib/src/cow_ws.erl', line: 725
]
},
{
:cow_ws,
:frame,
2,
[file: '.../deps/cowlib/src/cow_ws.erl', line: 666
]
},
{
:cowboy_websocket,
:websocket_send,
2,
[file: '.../deps/cowboy/src/cowboy_websocket.erl', line: 626
]
},
{
:cowboy_websocket,
:handler_call,
6,
[file: '.../deps/cowboy/src/cowboy_websocket.erl', line: 542
]
},
{
:cowboy_http,
:loop,
1,
[file: '.../deps/cowboy/src/cowboy_http.erl', line: 257
]
},
{
:proc_lib,
:init_p_do_apply,
3,
[file: 'proc_lib.erl', line: 226
]
}
]
}
Thanks!