-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logs about errors during adding peer #191
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #191 +/- ##
==========================================
+ Coverage 86.89% 87.19% +0.30%
==========================================
Files 77 77
Lines 1549 1570 +21
==========================================
+ Hits 1346 1369 +23
+ Misses 203 201 -2
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Do we want to merge this PR? |
@@ -107,6 +107,10 @@ defmodule FishjamWeb.RoomController do | |||
room_id = Map.get(params, "roomId") | |||
{:error, :bad_request, "Cannot add room with id \"#{room_id}\" - room already exists"} | |||
|
|||
{:error, :room_doesnt_start} -> | |||
room_id = Map.get(params, "roomId") | |||
{:error, :bad_request, "Cannot add room with id \"#{room_id}\" - adding failed"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about "unexpected error" instead? I feel like we're repeating ourselves with "adding failed"
@@ -65,6 +66,8 @@ defmodule FishjamWeb.PeerController do | |||
] | |||
|
|||
def create(conn, %{"room_id" => room_id} = params) do | |||
Logger.debug("Successfully added peer to room: #{room_id}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this inside with
Co-authored-by: Michał Śledź <michalsledz34@gmail.com>
Co-authored-by: Michał Śledź <michalsledz34@gmail.com>
Acknowledging the stipulations set forth: