refactor: Improve error message on meeting or session invalid #16060
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.
This PR introduces a new prop
messageKey
to the return of API/enter
requests. It will allow the client (html5) handle the error messages and show the properly error.Before
Since #12693 the API was always returning
guestDeny
error even when the meeting doesn't exist.And once the client-html5 doesn't know the correct error it use to show a generic error for example when returning from disconnection:
access_danied.mp4
After
This PR will follow an order to check if error exists and return to the client something more meaningful.
Using the same example as above now it shows the error "Meeting has ended" which is much more useful.
meeting_ended.mp4
Possibly closes: #16036 and #16037
It can still be improved in the API version 2. The current one doesn't know the error because once the meeting is ended, the API removes all informations about that including the users sessions. So it is impossible to know if the problem is related with the sessionToken or if the meeting ended.