Skip to content

Commit 0871c03

Browse files
Fix ncit NotSupportedError usage
1 parent 47cddbe commit 0871c03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ncit/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ const pickEndpoint = (conceptName, parentConcepts = '') => {
7575
}
7676
if (diseaseConcepts.some(term => conceptName.includes(term))) {
7777
if (endpoint) {
78-
throw NotSupportedError(`Concept must be in a discrete category (${conceptName})`);
78+
throw new NotSupportedError(`Concept must be in a discrete category (${conceptName})`);
7979
}
8080
endpoint = 'Disease';
8181
}
8282
if (therapeuticConcepts.some(term => conceptName.includes(term))) {
8383
if (endpoint) {
84-
throw NotSupportedError(`Concept must be in a discrete category (${conceptName})`);
84+
throw new NotSupportedError(`Concept must be in a discrete category (${conceptName})`);
8585
}
8686
endpoint = 'Therapy';
8787
}

0 commit comments

Comments
 (0)