Skip to content

Commit

Permalink
More error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rados13 committed May 10, 2024
1 parent 6a78df6 commit fe4db01
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/jellyfish/room_service.ex
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ defmodule Jellyfish.RoomService do

@impl true
def handle_call({:create_room, config}, _from, state) do
Logger.info("Start create room")

with {:ok, room_pid, room_id} <- Room.start(config) do
room = Room.get_state(room_id)
Process.monitor(room_pid)
Expand All @@ -152,6 +154,10 @@ defmodule Jellyfish.RoomService do
else
{:error, :room_already_exists} = error ->
{:reply, error, state}

reason ->
Logger.warning("Room creation failed with reason: #{inspect(reason)}")
{:reply, :room_doesnt_start, state}
end
end

Expand Down

0 comments on commit fe4db01

Please sign in to comment.