Skip to content

Commit

Permalink
Merge pull request #297 from RoadieHQ/fix-bad-entity-error
Browse files Browse the repository at this point in the history
Fix unhelpful error
  • Loading branch information
Nicolas Arnold authored Nov 29, 2021
2 parents a66a56a + 212fb22 commit 4c94940
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion utils/roadie-backstage-entity-validator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@roadiehq/roadie-backstage-entity-validator",
"version": "1.2.1",
"version": "1.2.2",
"author": "RoadieHQ",
"description": "Backstage entity validator library",
"main": "src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion utils/roadie-backstage-entity-validator/src/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function modifyPlaceholders(obj) {
return;
}
} catch(e) {
throw new Error(`Placeholder with name ${k} is empty. Please remove it or populate it.`)
throw new Error(`Placeholder with name '${k}' is empty. Please remove it or populate it.`)
}
modifyPlaceholders(obj[k]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('validator', () => {
});

it('Should fail to validate with incorrect catalog-info that has an empty label', async () => {
await expect(validator.validateFromFile('./sample/catalog-info-with-empty-label.yml')).rejects.toThrow("Error: Placeholder with name definition is empty. Please remove it or populate it.");
await expect(validator.validateFromFile('./sample/catalog-info-with-empty-label.yml')).rejects.toThrow("Error: Placeholder with name 'definition' is empty. Please remove it or populate it.");
});
})

0 comments on commit 4c94940

Please sign in to comment.