Skip to content

Commit

Permalink
Add error message for lacking consumer startup
Browse files Browse the repository at this point in the history
Instead of relying on the user to interpret the existing debug logs and
badmatch error, send an explicit error message when no consumer could be
found that we can use in the shard connection. See #524.
  • Loading branch information
jchristgit committed Oct 19, 2023
1 parent 1ec397f commit d806bf9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/nostrum/shard/session.ex
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,14 @@ defmodule Nostrum.Shard.Session do
{^reference, :join, _group, _who} ->
:ok
after
timeout -> :timeout
timeout ->
Logger.error(
"No consumers were running nor did any start up in time " <>
"for shard session startup. Is a consumer started as " <>
"part of your supervision tree?"
)

:timeout
end
end
end

0 comments on commit d806bf9

Please # to comment.