diff --git a/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.ts b/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.ts index ed8fb3b1a..126727863 100644 --- a/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.ts +++ b/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.ts @@ -966,7 +966,10 @@ export class OcrTemplateEditorComponent implements OnInit, OnDestroy { }) }, error: (err) => { - alert(err.error?.error || 'Failed to create custom field') + this.toastService.showError( + $localize`Failed to create custom field.`, + err + ) }, }) }