Merge pull request #13345 from gudmojo/error-substring
Limit the length of errors that get written to the database
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Limit the length of error messages that get written to the database and logs - to prevent performance issues
|
||||
@@ -97,7 +97,10 @@ export class UrlReaderProcessor implements CatalogProcessor {
|
||||
emit(processingResult.refresh(`${location.type}:${location.target}`));
|
||||
} catch (error) {
|
||||
assertError(error);
|
||||
const message = `Unable to read ${location.type}, ${error}`;
|
||||
const message = `Unable to read ${location.type}, ${error}`.substring(
|
||||
0,
|
||||
5000,
|
||||
);
|
||||
if (error.name === 'NotModifiedError' && cacheItem) {
|
||||
for (const parseResult of cacheItem.value) {
|
||||
emit(parseResult);
|
||||
|
||||
Reference in New Issue
Block a user