-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
fix: give proper status code for invalid sequence metadata requests #29741
fix: give proper status code for invalid sequence metadata requests #29741
Conversation
If the sequence metadata view is asked to give metadata for a block that is not a sequence (or section), give a proper http code back, rather than throwing an attribute exception. This avoids a monitoring error being flagged, and lets the frontend catch this case specially (which the MFE does do, to notice that it actually has a unit, not a sequence).
59c001b
to
1faf355
Compare
Thanks for the pull request, @asadiqbal08! I've created OSPR-6384 to keep track of it in JIRA, where we prioritize reviews. Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
@asadiqbal08 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
@asadiqbal08 Thank you for your contribution,. |
…equests (openedx#29741)" This reverts commit a76a79f. it was a backport of openedx#29741 but it was breaking unit tests
…penedx#29741) If the sequence metadata view is asked to give metadata for a block that is not a sequence (or section), give a proper http code back, rather than throwing an attribute exception. This avoids a monitoring error being flagged, and lets the frontend catch this case specially (which the MFE does do, to notice that it actually has a unit, not a sequence). Co-authored-by: Michael Terry <mterry@edx.org>
…penedx#29741) If the sequence metadata view is asked to give metadata for a block that is not a sequence (or section), give a proper http code back, rather than throwing an attribute exception. This avoids a monitoring error being flagged, and lets the frontend catch this case specially (which the MFE does do, to notice that it actually has a unit, not a sequence). Co-authored-by: Michael Terry <mterry@edx.org>
If the sequence metadata view is asked to give metadata for a block
that is not a sequence (or section), give a proper http code back,
rather than throwing an attribute exception.
This avoids a monitoring error being flagged, and lets the frontend
catch this case specially (which the MFE does do, to notice that it
actually has a unit, not a sequence).
Description
After running Maple in production for a couple weeks, we began seeing errors link this in our logs:
It seems to be associated with students experiencing timeouts when clicking the middle item in the Learner MFE breadcrumbs (the sequential).
Demo: 'VerticalBlockWithMixins' object has no attribute 'get_metadata'
Supporting information
fixes: openedx/wg-build-test-release#129
Contain the changes of edx/edx-platform@7123807