Merge pull request #7714 from backstage/freben/stringify-error

Add `stringifyError`
This commit is contained in:
Fredrik Adelöw
2021-10-21 19:08:50 +02:00
committed by GitHub
7 changed files with 63 additions and 21 deletions
@@ -20,7 +20,7 @@ import {
parseEntityRef,
UNSTABLE_EntityStatusItem,
} from '@backstage/catalog-model';
import { SerializedError } from '@backstage/errors';
import { SerializedError, stringifyError } from '@backstage/errors';
import { Knex } from 'knex';
import { uniqBy } from 'lodash';
import { v4 as uuid } from 'uuid';
@@ -49,7 +49,9 @@ export class Stitcher {
try {
await this.stitchOne(entityRef);
} catch (error) {
this.logger.error(`Failed to stitch ${entityRef}, ${error}`);
this.logger.error(
`Failed to stitch ${entityRef}, ${stringifyError(error)}`,
);
}
}
}