Manav Rathi 1 năm trước cách đây
mục cha
commit
1106393045

+ 1 - 1
web/apps/photos/src/services/typeDetectionService.ts

@@ -64,7 +64,7 @@ export async function getFileType(
             throw Error(CustomError.UNSUPPORTED_FILE_FORMAT);
         }
         log.error(`type detection failed for format ${fileFormat}`, e);
-        throw Error(CustomError.TYPE_DETECTION_FAILED(fileFormat));
+        throw new Error(`type detection failed ${fileFormat}`);
     }
 }
 

+ 0 - 2
web/packages/shared/error/index.ts

@@ -56,8 +56,6 @@ export const CustomError = {
     HIDDEN_COLLECTION_SYNC_FILE_ATTEMPTED:
         "hidden collection sync file attempted",
     UNKNOWN_ERROR: "Something went wrong, please try again",
-    TYPE_DETECTION_FAILED: (fileFormat: string) =>
-        `type detection failed ${fileFormat}`,
     WINDOWS_NATIVE_IMAGE_PROCESSING_NOT_SUPPORTED:
         "Windows native image processing is not supported",
     NETWORK_ERROR: "Network Error",