diff --git a/web/src/views/Wizard/WizardImport.vue b/web/src/views/Wizard/WizardImport.vue index 86fd4b0f..f30cedcc 100644 --- a/web/src/views/Wizard/WizardImport.vue +++ b/web/src/views/Wizard/WizardImport.vue @@ -31,11 +31,8 @@ >Import -
-
Import Response
-
-
- {{ import_response }} +
+ Error: {{ error }}
@@ -64,6 +61,7 @@ export default { data() { return { file: null, + error: null, }; }, computed: { @@ -154,9 +152,13 @@ export default { */ async onSubmit(evt) { evt.preventDefault(); - const results = await this.doImport(); - this.setDiscoveryModel(JSON.stringify({ discoveryModel: results.discoveryModel })); - this.$router.push('/wizard/discovery-config'); + try { + const results = await this.doImport(); + this.setDiscoveryModel(JSON.stringify({ discoveryModel: results.discoveryModel })); + this.$router.push('/wizard/discovery-config'); + } catch (err) { + this.error = err.error || 'An error occurred during import'; + } }, }, /**