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

handle AttributeError in exception clause #36317

Merged
merged 1 commit into from
Mar 4, 2025
Merged

Conversation

mfarhan943
Copy link
Contributor

@mfarhan943 mfarhan943 commented Mar 3, 2025

Description

Issue:

The frontend-app-course-authoring MFE has a bug (PR) where an empty string ("") is sent to the backend instead of null when the date field is empty. This results in a 500 error, preventing users from accessing Studio.

Fix:

To resolve this issue:

  • We now handle the AttributeError exception along with the existing ValueError.

  • When the backend encounters an empty string in the date field, it will catch the AttributeError, set the date to its default value, and prevent the error.

Related Ticket

https://2u-internal.atlassian.net/browse/TNL-11914

Copy link

@hinakhadim hinakhadim left a comment

Choose a reason for hiding this comment

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

LGTM!

@mfarhan943 mfarhan943 merged commit 988801f into master Mar 4, 2025
49 checks passed
@mfarhan943 mfarhan943 deleted the farhan/nonetype-year branch March 4, 2025 08:05
@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.

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