Skip to content

Commit

Permalink
chore: print more error infomation
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jun 7, 2023
1 parent 06eaa13 commit 7fbf79f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/core/service/FixNoPaddingVersionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ export class FixNoPaddingVersionService {
await pMap(packageVersions, async packageVersion => {
// ignore invalid version, e.g.: '1000000000000000000.0.0' on https://registry.npmjs.com/latentflip-test
if (!semver.valid(packageVersion.version)) return;
const paddingSemver = new PaddingSemVer(packageVersion.version);
await this.packageVersionRepository.fixPaddingVersion(packageVersion.packageVersionId, paddingSemver);
try {
const paddingSemver = new PaddingSemVer(packageVersion.version);
await this.packageVersionRepository.fixPaddingVersion(packageVersion.packageVersionId, paddingSemver);
} catch (err) {
this.logger.error('[FixNoPaddingVersionService:error] package_version_id: %s, version: %j, error: %s', packageVersion.packageVersionId, packageVersion.version, err);
throw err;
}
}, { concurrency: 30 });
}
}
Expand Down

0 comments on commit 7fbf79f

Please sign in to comment.