INNER CODE UNIT · JavaScript
data
IHTSDO/snowstorm · src/main/resources/fhir/js/dashboard/conceptMapUi.js:141
const data = res.ok ? await res.json().catch(() => ({})) : await res.json().catch(() => ({}));
if (!res.ok) {
const msg = data.issue && data.issue[0] && (data.issue[0].diagnostics || data.issue[0].details && data.issue[0].details.text);
throw new Error(msg || data.message || 'Failed to add ConceptMap');
}
this.clearAddConceptMapForm();
this.showAddConceptMapForm = false;
await this.loadConceptMaps();
alert('ConceptMap added successfully.');
} catch (err) {
this.addConceptMapError = err.message || 'Failed to add ConceptMap';
} finally {
this.addConceptMapSaving = false;
}
},
clearAddConceptMapForm() {
this.addConceptMapPayload = null;