about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/state/queries/video/video.ts18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/state/queries/video/video.ts b/src/state/queries/video/video.ts
index ee0724498..0c65e2260 100644
--- a/src/state/queries/video/video.ts
+++ b/src/state/queries/video/video.ts
@@ -123,12 +123,16 @@ export function useUploadVideo({
         blobRef,
       })
     },
-    onError: useCallback(() => {
-      dispatch({
-        type: 'SetError',
-        error: _(msg`Video failed to process`),
-      })
-    }, [_]),
+    onError: useCallback(
+      error => {
+        logger.error('Error processing video', {safeMessage: error})
+        dispatch({
+          type: 'SetError',
+          error: _(msg`Video failed to process`),
+        })
+      },
+      [_],
+    ),
   })
 
   const {mutate: onVideoCompressed} = useUploadVideoMutation({
@@ -140,6 +144,7 @@ export function useUploadVideo({
       setJobId(response.jobId)
     },
     onError: e => {
+      logger.error('Error uploading video', {safeMessage: e})
       if (e instanceof ServerError) {
         dispatch({
           type: 'SetError',
@@ -171,6 +176,7 @@ export function useUploadVideo({
       onVideoCompressed(video)
     },
     onError: e => {
+      logger.error('Error uploading video', {safeMessage: e})
       if (e instanceof VideoTooLargeError) {
         dispatch({
           type: 'SetError',