Skip to content
Snippets Groups Projects
Unverified Commit 9d29f07d authored by Tasawer Nawaz's avatar Tasawer Nawaz Committed by GitHub
Browse files

Merge pull request #18594 from...

Merge pull request #18594 from edx/tasawer/learner-4467/fix-exception-handling-in-award-program-certificate-task

Fix exception handling in award program certificate task
parents 507d5e38 87ddb56b
Branches
Tags
No related merge requests found
......@@ -173,7 +173,7 @@ def award_program_certificates(self, username):
try:
award_program_certificate(credentials_client, username, program_uuid)
LOGGER.info('Awarded certificate for program %s to user %s', program_uuid, username)
except exceptions.HttpNotFoundError:
except exceptions.HttpClientError:
LOGGER.exception(
'Certificate for program %s not configured, unable to award certificate to %s',
program_uuid, username
......
......@@ -301,7 +301,7 @@ class AwardProgramCertificatesTestCase(CatalogIntegrationMixin, CredentialsApiCo
mock_get_completed_programs.return_value = [1, 2]
mock_get_certified_programs.side_effect = [[], [2]]
mock_award_program_certificate.side_effect = self._make_side_effect(
[exceptions.HttpNotFoundError(), None]
[exceptions.HttpClientError(), None]
)
tasks.award_program_certificates.delay(self.student.username).get()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment