diff --git a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/edit-dossier-dictionary.component.ts b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/edit-dossier-dictionary.component.ts index 8adfdd502..a2ddfdbc6 100644 --- a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/edit-dossier-dictionary.component.ts +++ b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/edit-dossier-dictionary.component.ts @@ -61,7 +61,10 @@ export class EditDossierDictionaryComponent implements OnInit { false, this.activeEntryType, ); - + } catch (error) { + return { success: false }; + } + try { await this.#updateDossierDictionary(); return { success: true }; } catch (error) { diff --git a/apps/red-ui/src/app/services/entity-services/dictionary.service.ts b/apps/red-ui/src/app/services/entity-services/dictionary.service.ts index af917e439..04ed5d4ca 100644 --- a/apps/red-ui/src/app/services/entity-services/dictionary.service.ts +++ b/apps/red-ui/src/app/services/entity-services/dictionary.service.ts @@ -125,6 +125,7 @@ export class DictionaryService extends EntitiesService } else { this._toaster.error(_('dictionary-overview.error.generic')); } + throw error; } }