reload on connect in quizsummarypage; avoid possible error w/ missing… #12554
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Closes #12388
I was only able to replicate the error described there by @AlexVelezLl when I forced specifically a 502 error within the
size
endpoint's handler. I don't know any way that a 502 would come through unless the server is disconnected somehow during the page load.I could not replicate it naturally, however, so I cannot be 100% this addresses the issue at hand here.
But, ultimately, what it came down to was that if the page got a 502 error, it would show the proper "disconnected" snackbar & backdrop. In this case, the value used
this.quizId
was not yet initialized.The change here ensures that when the user regains connection to the server, their page will reload, hopefully successfully.
One thing of concern is that if there is a way in which we could end up getting some kind of unjustified 502, then this could just result in an infinite loop of failing to connect and reloading.
The only way that I can think of that the size endpoint's handler would cause a 502 is if it's crashing the server. I've made some large quizzes during development on EQM and I've not had any issues with it and trying it didn't help replicate the issue.
Without some kind of stack trace for the error from a naturally occurring replication of the error this will be hard to debug, as there are several calls within that could cause the failure:
Also worth noting that my first thought was to force an error within the function there, but that just resulted in the expected
400 Bad request
rather than the502
that is the direct cause of this issue.Reviewer guidance
Code review
QA
Path 1: Fake replication
kolibri stop
, causing the backend to no longer be availablePath 2: Possibly replicate it naturally