Skip to content

Commit 4efa9b5

Browse files
authored
fix: log a single line warning in case of video_transcrip NotFound instead of long detailed exception (#28552)
1 parent 36283f1 commit 4efa9b5

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

common/lib/xmodule/xmodule/video_module/video_handlers.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,13 @@ def transcript(self, request, dispatch):
347347
mimetype,
348348
add_attachment_header=False
349349
)
350-
except NotFoundError:
351-
log.exception('[Translation Dispatch] %s', self.location)
350+
except NotFoundError as exc:
351+
edx_video_id = clean_video_id(self.edx_video_id)
352+
log.warning(
353+
'[Translation Dispatch] %s: %s',
354+
self.location,
355+
exc if is_bumper else f'Transcript not found for {edx_video_id}, lang: {self.transcript_language}',
356+
)
352357
response = self.get_static_transcript(request, transcripts)
353358

354359
elif dispatch == 'download':

0 commit comments

Comments
 (0)