You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following bug is present on production and main.
When a student uses a teacher link to join a class, and clicks the button to join the class, the request to do so succeeds, but the student gets an error message about a network error. Subsequent presses on the button result in an error message explaining that the class has already been joined. Refreshing the page reveals that the student has successfully joined the class.
The error occurs because the response of join_class in classes.py return an empty string text/html response, while join_class in teachers.ts expects a JSON response. Because the request actually returns a 200, it shows a general network error, and the end-to-end tests only verify the 200.
This bug seems to have been introduced in #5558 in May 2024, which switched from jsonify to make_response. Or perhaps it was fixed shortly after that and recently reintroduced, because that's almost a year ago and this bug is so visible I'd think it would've been noticed sooner.
It's likely this bug affects other actions in a similar way.
The text was updated successfully, but these errors were encountered:
…#6161)
Fixes#6160, and potentially similar bugs as well.
⚠️ I changes all occurrences of `'', 200` in `make_response`, but I only tested that `join_class` works as intended and #6160 is fixed. I don't know enough about the application to test the other occurrences effectively. This should be tested for the other functionality as well by a maintainer.
The following bug is present on production and
main
.When a student uses a teacher link to join a class, and clicks the button to join the class, the request to do so succeeds, but the student gets an error message about a network error. Subsequent presses on the button result in an error message explaining that the class has already been joined. Refreshing the page reveals that the student has successfully joined the class.
The error occurs because the response of
join_class
inclasses.py
return an empty stringtext/html
response, whilejoin_class
inteachers.ts
expects a JSON response. Because the request actually returns a200
, it shows a general network error, and the end-to-end tests only verify the200
.This bug seems to have been introduced in #5558 in May 2024, which switched from
jsonify
tomake_response
. Or perhaps it was fixed shortly after that and recently reintroduced, because that's almost a year ago and this bug is so visible I'd think it would've been noticed sooner.It's likely this bug affects other actions in a similar way.
The text was updated successfully, but these errors were encountered: