Skip to content

Commit

Permalink
refactor: give better warning for not valid quality names
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackDark committed Apr 19, 2024
1 parent 042c442 commit 93c6187
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/quality-profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ const mapQualities = (qd: QualityDefinitionResource[], value: YamlConfigQualityP
};
} else {
const serverQD = qdMap.get(obj.name);

if (serverQD == null) {
logger.warn(`Unknown requested quality "${obj.name}" for quality profile ${value.name}`);
throw new Error(`Please correct your config.`);
}

qdMap.delete(obj.name);

return {
Expand Down

0 comments on commit 93c6187

Please sign in to comment.