Skip to content
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

Merged
merged 11 commits into from
Jun 3, 2024
Merged

Add logs about errors during adding peer #191

merged 11 commits into from
Jun 3, 2024

Conversation

Rados13
Copy link
Contributor

@Rados13 Rados13 commented May 10, 2024

Acknowledging the stipulations set forth:

  • I hereby confirm that a Pull Request involving updates to the Software Development Kit (SDK) has been smoothly merged, currently awaits processing, or is otherwise deemed unnecessary in this context.
  • I also affirm that another Pull Request, specifically addressing updates to the documentation body (commonly referred to as 'docs'), has either been successfully incorporated, is in the process of review, or is considered superfluous under the prevailing circumstances.

Copy link

codecov bot commented May 10, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 87.19%. Comparing base (07a89a9) to head (070852c).

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     
Files Coverage Δ
lib/fishjam_web/controllers/fallback_controller.ex 100.00% <100.00%> (ø)
lib/fishjam_web/controllers/peer_controller.ex 100.00% <100.00%> (ø)
lib/fishjam/room_service.ex 83.78% <60.00%> (-1.73%) ⬇️
lib/fishjam_web/controllers/room_controller.ex 94.87% <33.33%> (-5.13%) ⬇️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 07a89a9...070852c. Read the comment docs.

@roznawsk
Copy link
Member

Do we want to merge this PR?

@Rados13 Rados13 self-assigned this May 27, 2024
@Rados13 Rados13 marked this pull request as ready for review May 27, 2024 10:59
@Rados13 Rados13 requested review from mickel8 and sgfn May 27, 2024 12:09
lib/fishjam/room_service.ex Outdated Show resolved Hide resolved
lib/fishjam/room_service.ex Outdated Show resolved Hide resolved
lib/fishjam_web/controllers/peer_controller.ex Outdated Show resolved Hide resolved
@@ -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"}
Copy link
Member

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"

lib/fishjam/room_service.ex Outdated Show resolved Hide resolved
@@ -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}")
Copy link
Contributor

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

@Rados13 Rados13 merged commit 453531f into main Jun 3, 2024
7 checks passed
@Rados13 Rados13 deleted the add_error_logs branch June 3, 2024 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants