Améliorer la gestion des erreurs lors de la mise à jour du fichier vidéo dans la route de rendu
This commit is contained in:
@@ -321,12 +321,12 @@ router.post('/videos/render/:video_id', (req, res) => {
|
|||||||
const videoFile = videoManager.createVideoWithList(project_id, pathList);
|
const videoFile = videoManager.createVideoWithList(project_id, pathList);
|
||||||
console.log('Video file:', videoFile);
|
console.log('Video file:', videoFile);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
videoManager.updateVideoFile(videoId, videoFile);
|
videoManager.updateVideoFile(videoId, videoFile);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Error updating video file:', err);
|
console.error('Error updating video file:', err);
|
||||||
res.status(500).json({ error: 'Error updating video file' });
|
res.status(500).json({ error: 'Error updating video file' });
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.error('Error getting path list:', err);
|
console.error('Error getting path list:', err);
|
||||||
res.status(500).json({ error: 'Error getting path list' });
|
res.status(500).json({ error: 'Error getting path list' });
|
||||||
|
|||||||
Reference in New Issue
Block a user