diff --git a/web/apps/photos/src/services/machineLearning/mlWorkManager.ts b/web/apps/photos/src/services/machineLearning/mlWorkManager.ts index d62d6f829..c5df14b22 100644 --- a/web/apps/photos/src/services/machineLearning/mlWorkManager.ts +++ b/web/apps/photos/src/services/machineLearning/mlWorkManager.ts @@ -186,8 +186,7 @@ class MLWorkManager { return mlWorker.syncLocalFile(token, userID, enteFile, localFile); }); - // @ts-expect-error "TODO: Fix ML related type errors" - if ("message" in result) { + if (result instanceof Error) { // TODO: redirect/refresh to gallery in case of session_expired // may not be required as uploader should anyways take care of this console.error("Error while syncing local file: ", result);