diff options
Diffstat (limited to 'ext/js/dictionary/dictionary-importer.js')
-rw-r--r-- | ext/js/dictionary/dictionary-importer.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/js/dictionary/dictionary-importer.js b/ext/js/dictionary/dictionary-importer.js index 16998a8f..310b2ec1 100644 --- a/ext/js/dictionary/dictionary-importer.js +++ b/ext/js/dictionary/dictionary-importer.js @@ -106,7 +106,10 @@ export class DictionaryImporter { // Verify database is not already imported if (await dictionaryDatabase.dictionaryExists(dictionaryTitle)) { - throw new Error('Dictionary is already imported'); + return { + errors: [new Error(`Dictionary ${dictionaryTitle} is already imported, skipped it.`)], + result: null + }; } // Load schemas |