IMPROVE error handling on frontend

This commit is contained in:
2025-06-10 12:12:19 +02:00
parent faaac0abec
commit f79beadb09
5 changed files with 48 additions and 25 deletions

View File

@@ -33,18 +33,15 @@ const ClipEdit = () => {
setDownloadable(false);
const edited = await editFile(id, outputMetadata);
const processed = await processFile(id);
const edited = await editFile(id, outputMetadata, setError);
if (!edited) {
console.log("Failed to edit file");
setError("Failed to edit file. Please check the metadata and try again.");
return;
}
const processed = await processFile(id, setError);
if (!processed) {
console.log("Failed to process file");
setError("Failed to process file. Please try again later.");
return;
}