add new error message for upload .wav file

This commit is contained in:
smanylov
2026-02-21 22:11:43 +07:00
parent 79e3a5b902
commit 9709b938f2
4 changed files with 14 additions and 19 deletions
+1 -11
View File
@@ -302,17 +302,7 @@ export default function UploadSectionFile({
} catch (error) {
if (!isCancelledRef.current.get(fileId)) {
const errorMessage = (() => {
switch (error) {
case 'duplicate-file':
return t('error-duplicate-file');
case 'user-not-have-tokens-for-protect':
return t('error-user-not-have-tokens-for-protect');
default:
return t('error-uploading-file');
}
})();
const errorMessage = (typeof error === 'string') ? t(error) : t('error-uploading-file');
setSelectedFiles(prev => prev.map(f =>
f.name === fileInfo.name ? { ...f, status: 'error', error: errorMessage } : f
));