log errors (#5139)
This commit is contained in:
@@ -123,12 +123,16 @@ export function useUploadVideo({
|
|||||||
blobRef,
|
blobRef,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onError: useCallback(() => {
|
onError: useCallback(
|
||||||
|
error => {
|
||||||
|
logger.error('Error processing video', {safeMessage: error})
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'SetError',
|
type: 'SetError',
|
||||||
error: _(msg`Video failed to process`),
|
error: _(msg`Video failed to process`),
|
||||||
})
|
})
|
||||||
}, [_]),
|
},
|
||||||
|
[_],
|
||||||
|
),
|
||||||
})
|
})
|
||||||
|
|
||||||
const {mutate: onVideoCompressed} = useUploadVideoMutation({
|
const {mutate: onVideoCompressed} = useUploadVideoMutation({
|
||||||
@@ -140,6 +144,7 @@ export function useUploadVideo({
|
|||||||
setJobId(response.jobId)
|
setJobId(response.jobId)
|
||||||
},
|
},
|
||||||
onError: e => {
|
onError: e => {
|
||||||
|
logger.error('Error uploading video', {safeMessage: e})
|
||||||
if (e instanceof ServerError) {
|
if (e instanceof ServerError) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'SetError',
|
type: 'SetError',
|
||||||
@@ -171,6 +176,7 @@ export function useUploadVideo({
|
|||||||
onVideoCompressed(video)
|
onVideoCompressed(video)
|
||||||
},
|
},
|
||||||
onError: e => {
|
onError: e => {
|
||||||
|
logger.error('Error uploading video', {safeMessage: e})
|
||||||
if (e instanceof VideoTooLargeError) {
|
if (e instanceof VideoTooLargeError) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'SetError',
|
type: 'SetError',
|
||||||
|
|||||||
Reference in New Issue
Block a user