-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat(messaging): game join failed command #1045
base: develop
Are you sure you want to change the base?
Conversation
* When player fails to join a game, instead of "notice", a new "game_join_failed" event is being sent, so the consumer can programmatically handle the exceptional behaviour
fa72e8a
to
f7f994b
Compare
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.
I think this is a great idea, and much needed addition honestly. I would have done it ages ago if I had someone to do the client side work for it, so happy to see someone is able to do that!
Some of the tests are flaky and will pass when we re-run them, although one of them is failing because the notice
messages were removed and the test is expecting them to be there. That's why we need to keep sending the notice messages even with the addition of the new game_join_failed
messages.
server/exceptions.py
Outdated
|
||
def __init__(self, message, uid, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
self.message = message |
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.
I think we don't need to include the english messages. We should use fixed error codes instead like invalid_uid
, invalid_state
, invalid_password
etc.
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.
yes, I need to think about a structure for the object that we are gonna send, that will be useful for the client. With the new version check we have the ability to do this breaking change now.
- Introduces version check mechanism for the client, so breaking API changes can be introduced, while remaining backwards-compatible
f3e018b
to
bda6487
Compare
2a1b66f
to
089887d
Compare
When player fails to join a game, instead of
notice
, a newgame_join_failed
event is being sent, so the consumer can programmatically handle the exceptional behaviorThis will be used in
faf-java-commons
for handling this situations, and then finally in the clientCloses #1044