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

[Bug]: Infinite loop between front end and back end if tournament is missing. #71

Open
fintanneff opened this issue Mar 21, 2023 · 1 comment
Assignees
Labels
bug Something isn't working good first issue Good for newcomers SquireWeb Affects the SquireWeb frontend webapp todo Will be resolved but work hasn't started

Comments

@fintanneff
Copy link
Contributor

What went wrong:

When the user tries to access the site in their browser, there is an infinite loop between the front end and the back end if the tournament is missing from the database.

Expected behavior:

An infinite loop should not be possible; I presume there should be some kind of error message presented instead.

@fintanneff fintanneff added bug Something isn't working todo Will be resolved but work hasn't started labels Mar 21, 2023
@TylerBloom TylerBloom added the SquireWeb Affects the SquireWeb frontend webapp label Mar 21, 2023
@TylerBloom
Copy link
Member

The problem here should be fairly simple to fix. When loading a tournament's page, the frontend sends a request to the backend and immediately attempts to deserialize the JSON in the body. If this fails, it sends a new request. This causes the loop. However, the backend doesn't send back a TournamentManager but rather an Option<TournamentManager>. We can simply check if the response is None and not send a request again. In the None case, we should probably show the user a screen like "Tournament not found".

@TylerBloom TylerBloom added the good first issue Good for newcomers label Mar 21, 2023
@TylerBloom TylerBloom added this to the SquireWeb Prototype milestone Jun 23, 2023
@TylerBloom TylerBloom removed this from the SquireWeb Prototype milestone Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers SquireWeb Affects the SquireWeb frontend webapp todo Will be resolved but work hasn't started
Projects
Development

No branches or pull requests

2 participants