Skip to content

Conversation

@LPLafontaineB
Copy link
Contributor

@LPLafontaineB LPLafontaineB commented Oct 24, 2022

Description

This PR changes the behaviour of hosts regarding the Lobby service when they shutdown. Now, instead of leaving their lobby, they will delete it.

However, this makes it so clients who get disconnected afterwards will receive a LobbyNotFound error when trying to leave it. To prevent this, this PR also refactors how we handle Lobby exceptions, following the best practices outlined here. Now, instead of all being handled the same way in LobbyAPIInterface and always publishing errors, the responsibility is moved to LobbyServiceFacade. Since every call knows which errors to ignore and which ones to consider, it is each method's responsibility to determine how they handle LobbyServiceExceptions.

Issue Number(s)

MTT-4798 & MTT-4576

Contribution checklist

  • [n/a] Tests have been added for boss room and/or utilities pack
  • Release notes have been added to the project changelog file and/or package changelog file
  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • JIRA ticket ID is in the PR title or at least one commit message
  • Include the ticket ID number within the body message of the PR to create a hyperlink
  • [n/a] An Index entry has been added in readme.md if applicable

@LPLafontaineB LPLafontaineB added the 1-Needs Review PR needs attention from the assignee and reviewers label Oct 24, 2022
@LPLafontaineB LPLafontaineB marked this pull request as ready for review October 24, 2022 15:25
@LPLafontaineB LPLafontaineB added the 2-hard This PR requires 2 reviewers label Oct 26, 2022
Copy link
Contributor

@pdeschain pdeschain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good! It makes sense to move this error handling one layer up, so that we can have more fine-grained control over how we handle them. Great job.

@pdeschain pdeschain added 2-One More Review One review in, one to go and removed 1-Needs Review PR needs attention from the assignee and reviewers labels Nov 3, 2022
@LPLafontaineB LPLafontaineB changed the title feat: host delete lobby when shutdown [MTT-4798] feat: host delete lobby when shutdown [MTT-4798] [MTT-4576] Nov 3, 2022
@fernando-cortez fernando-cortez added 3-Good to Merge and removed 2-One More Review One review in, one to go labels Nov 7, 2022
@LPLafontaineB LPLafontaineB merged commit 69cb3a6 into develop Nov 7, 2022
@LPLafontaineB LPLafontaineB deleted the feature/host-delete-lobby-when-shutdown branch November 7, 2022 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2-hard This PR requires 2 reviewers 3-Good to Merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants