Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle review comments
Browse files Browse the repository at this point in the history
syedsajjadkazmii committed Dec 3, 2024
1 parent 2d483fe commit 5d00273
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion commerce_coordinator/apps/lms/tasks.py
Original file line number Diff line number Diff line change
@@ -45,9 +45,13 @@ def on_failure(self, exc, task_id, args, kwargs, einfo):
f"Order Number: {order_number}, Course Title: {course_title}"
)

# This error is returned from LMS if the course mode is unsupported
# https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/enrollments/views.py#L870
course_mode_expired_error = "course mode is expired or otherwise unavailable for course run"

if (
self.request.retries >= self.max_retries
and "course mode is expired or otherwise unavailable for course run" in error_message
and course_mode_expired_error in error_message
):

logger.info(

0 comments on commit 5d00273

Please sign in to comment.