Skip to content

Commit 93c6187

Browse files
committed
refactor: give better warning for not valid quality names
1 parent 042c442 commit 93c6187

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/quality-profiles.ts

+6
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ const mapQualities = (qd: QualityDefinitionResource[], value: YamlConfigQualityP
106106
};
107107
} else {
108108
const serverQD = qdMap.get(obj.name);
109+
110+
if (serverQD == null) {
111+
logger.warn(`Unknown requested quality "${obj.name}" for quality profile ${value.name}`);
112+
throw new Error(`Please correct your config.`);
113+
}
114+
109115
qdMap.delete(obj.name);
110116

111117
return {

0 commit comments

Comments
 (0)