Skip to content

Commit

Permalink
Log when values have been stripped
Browse files Browse the repository at this point in the history
  • Loading branch information
john-gom committed Nov 1, 2023
1 parent 974390c commit fc91caf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/domain/services/import.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export class ImportService {
// Strip out any nul characters
for (const [index, value] of tagData.entries()) {
if (value.includes('\u0000')) {
this.logger.warn(`Product: ${data.code}. Nuls stripped from ${key} value: ${value}`);
tagData[index] = value.replace(this.nulRegex, '');
}
}
Expand All @@ -133,7 +134,7 @@ export class ImportService {
product.obsolete = obsolete;
const lastModified = new Date(data.last_modified_t * 1000);
if (isNaN(+lastModified)) {
this.logger.log(`Invalid last_modified_t: ${data.last_modified_t}.`);
this.logger.warn(`Product: ${data.code}. Invalid last_modified_t: ${data.last_modified_t}.`);
} else {
product.lastModified = lastModified;
}
Expand Down

0 comments on commit fc91caf

Please sign in to comment.