Conversation
|
Thanks for the pull request, @jesperhodge! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
There was a problem hiding this comment.
@jesperhodge I agree that exception details should not be passed to the end user on a production site. However, it's useful behavior for developers. I'd expect the stack trace to be passed upwards when DEBUG==True, and a generic 500 to be shown when DEBUG==False.
Did you test with DEBUG==False? You can do django settings override, or just run the site with tutor local ....
|
To you other point:
yep, I agree. I think it's fine to either check for conflicts before renaming the tag, or use a very targeted |
|
I did have a look at openedx/openedx-platform#38246, an ADR in review that aims to standardize errors platform-wide. (Also reviewed it and left my thoughts.) I decided against implementing the proposed format more extensively here at this point, since there is still a lot to discuss around that. Rather, I think it makes sense that after that ADR is finalized we just implement a top-level CMS error handler, and this temporary solution in this PR can be removed at that time. |
|
To close the loop on this:
Jesper discussed in Slack that he did test with DEBUG==False, and he and Braden confirmed that this error detail leakage is a standing issue with DRF in general.
That approach sounds good to me @jesperhodge . Could you just include a link to the ADR PR in the temporary handlers so that we remember to remove them later? |
kdmccormick
left a comment
There was a problem hiding this comment.
Thanks for thinking this through and coming up with a stop-gap solution.
| @@ -4,12 +4,14 @@ | |||
| from __future__ import annotations | |||
There was a problem hiding this comment.
Thanks for the comprehensive tests.
e0475c8 to
6e25f2d
Compare
kdmccormick
left a comment
There was a problem hiding this comment.
Just one last request, and then we're good to merge. Thanks!
290fda5 to
3dd0700
Compare
3dd0700 to
d942235
Compare
Fixes openedx/modular-learning#261
Idea right now:
Question: This would be better handled at the CMS level?
Answer: There is ongoing work to fix this up, starting with a proposal. See https://openedx.slack.com/archives/CHYH0BDTR/p1775053660743269 and openedx/openedx-platform#38246 in particular.