Repository navigation
Terminate the enrollment error code sentence with a period - #4113
Merged
Merged
Conversation
The compliance support code was appended as "Unable to complete enrollment. Error code: CS_700", with no terminating period. Clients concatenate this detail with their own support copy - MIT Learn renders "<detail> Contact Support for assistance." - so an unterminated detail reads as a run-on sentence. Reported in review on mitodl/mit-learn#3918 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
OpenAPI ChangesShow/hide changesUnexpected changes? Ensure your branch is up-to-date with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What are the relevant tickets?
https://github.com/mitodl/hq/issues/13250
Description (What does it do?)
Follow-up to #3938, from review feedback on
mitodl/mit-learn#3918 (comment). The
appended support code left the detail unterminated -
"Unable to complete enrollment. Error code: CS_700"- and MIT Learn renders a server detailfollowed by its own support copy, so it read as a run-on:
"... Error code: CS_700 Contact Support for assistance."EnrollmentError.from_causenow ends the appended sentence with a period.default_detailalready ended in one.How can this be tested?
Tests should pass. I ran, on this branch:
docker compose run --rm web pytest -n0 courses/exceptions_test.py(3 passed)docker compose run --rm web pytest -n0 --no-cov courses/views/v1/views_test.py courses/views/v2/views_test.py courses/views/v3/views_test.py -k export_compliance(10 passed)Seeing the rendered copy needs mitodl/mit-learn#3918;
I have not re-run that end to end.
Additional Context
The review offered three fixes - wrap the copy onto multiple lines, detect the
missing period client-side, or terminate it upstream. This is the upstream one,
so Learn needs no change. Learn still renders any 400
detailverbatim intothat sentence, so an unterminated detail from anywhere else would reproduce it.