Skip to content
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: Improve messaging & logging when adding Library Content (Beta) fails #35707

Conversation

kdmccormick
Copy link
Member

We have user-oriented messaging stuffed into the BadUpstream exception. We may as well use it rather than just giving an opaque error about xblock references.

We also want to log this situation, since we'd expect that the library block usage key that Studio provides should generally be valid. If it consistently isn't, that's an issue that operators are going to want to look into.

Before:
image

After:

image

…ails

We have user-oriented messaging stuffed into the BadUpstream exception.
We may as well use it rather than just giving an opaque error about
xblock references.

We also want to log this situation, since we'd expect that the library
block usage key that Studio provides will generally be valid.
Comment on lines +600 to +601
f"Could not sync to new block at '{created_block.usage_key}' "
f"using provided library_content_key='{upstream_ref}'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, belatedly occurred to me, but don't we need to translate this string if we're presenting it to end users?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not-- that one just is going out to the logs.

The users see str(exc), i.e. the BadUpstream exception message, which we've already taken care to localize.

@kdmccormick kdmccormick merged commit af21100 into openedx:master Oct 23, 2024
49 checks passed
@kdmccormick kdmccormick deleted the kdmccormick/library-content-key-bad-upstream branch October 23, 2024 12:31
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants