Merge pull request #10003 from ashirley/feature/improveLog

Correct log message
This commit is contained in:
Patrik Oldsberg
2022-03-04 17:43:10 +01:00
committed by GitHub
2 changed files with 8 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': patch
---
Fixed display of the location in the log message that is printed when entity envelope validation fails.
@@ -72,17 +72,17 @@ export class ProcessorOutputCollector {
if (i.type === 'entity') {
let entity: Entity;
const location = stringifyLocationRef(i.location);
try {
entity = validateEntityEnvelope(i.entity);
} catch (e) {
assertError(e);
this.logger.debug(`Envelope validation failed at ${i.location}, ${e}`);
this.logger.debug(`Envelope validation failed at ${location}, ${e}`);
this.errors.push(e);
return;
}
const location = stringifyLocationRef(i.location);
// Note that at this point, we have only validated the envelope part of
// the entity data. Annotations are not part of that, so we have to be
// defensive. If the annotations were malformed (e.g. were not a valid