Skip to content

Commit

Permalink
Merge pull request #958 from AI4Bharat/minorchange-01
Browse files Browse the repository at this point in the history
error logging for video api
  • Loading branch information
kartikvirendrar authored Dec 18, 2024
2 parents c2fccaf + f2a657d commit 0c6c1fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/video/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@ def get_video_func(request):
title = video["snippet"]["title"]
duration_iso8601 = video["contentDetails"]["duration"]
duration = timedelta(seconds=iso8601_duration_to_seconds(duration_iso8601))
except:
except Exception as e:
logging.error(e)
return Response(
{"message": "This is an invalid video URL."},
status=status.HTTP_400_BAD_REQUEST,
Expand Down

0 comments on commit 0c6c1fe

Please sign in to comment.