cnpm / cnpmcore

Private NPM Registry for Enterprise
https://npmmirror.com
MIT License
622 stars 84 forks source link

don't log EINVALIDPACKAGENAMEError to common error #637

Closed fengmk2 closed 10 months ago

fengmk2 commented 10 months ago
2024-01-13 12:23:15,728 ERROR 36861 [-/-/203.209.245.193/0b469c4e17051197957235892e5bcb/1.84ms GET /+CSCOE+/portal.css] nodejs.EINVALIDPACKAGENAMEError: Invalid package name "+CSCOE+" of package "+CSCOE+@portal.css": name can only contain URL-friendly characters.
at invalidPackageName (/home/admin/app/node_modules/npm-package-arg/lib/npa.js:111:15)
at Result.setName (/home/admin/app/node_modules/npm-package-arg/lib/npa.js:158:11)
at new Result (/home/admin/app/node_modules/npm-package-arg/lib/npa.js:147:10)
at resolve (/home/admin/app/node_modules/npm-package-arg/lib/npa.js:59:15)
at npa (/home/admin/app/node_modules/npm-package-arg/lib/npa.js:53:10)
at PackageSemVerRequestAdvice.around (/home/admin/app/app/npm/biz/PackageSemVerRequestAdvice.js:32:54)
at /home/admin/app/node_modules/@eggjs/tegg-aop-runtime/dist/src/AspectExecutor.js:81:37
at dispatch (/home/admin/app/node_modules/koa-compose/index.js:42:32)
at /home/admin/app/node_modules/koa-compose/index.js:34:12
at AspectExecutor.doExecute (/home/admin/app/node_modules/@eggjs/tegg-aop-runtime/dist/src/AspectExecutor.js:86:53)
at AspectExecutor.execute (/home/admin/app/node_modules/@eggjs/tegg-aop-runtime/dist/src/AspectExecutor.js:22:39)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.<anonymous> (/home/admin/app/node_modules/@eggjs/tegg-controller-plugin/lib/impl/http/HTTPMethodRegister.js:76:26)
at async AlwaysAuth (/home/admin/app/node_modules/cnpmcore/dist/app/port/middleware/AlwaysAuth.js:14:5)
at async Tracing (/home/admin/app/node_modules/cnpmcore/dist/app/port/middleware/Tracing.js:19:5)
code: "EINVALIDPACKAGENAME"
name: "EINVALIDPACKAGENAMEError"
fengmk2 commented 10 months ago
2024-01-13 12:23:18,395 ERROR 1232 [-/-/203.209.245.193/0b469c4e17051197983776362e5bcb/3.53ms GET /.git/config] nodejs.EINVALIDPACKAGENAMEError: Invalid package name ".git" of package ".git@config": name cannot start with a period.
at invalidPackageName (/home/admin/app/node_modules/npm-package-arg/lib/npa.js:111:15)
at Result.setName (/home/admin/app/node_modules/npm-package-arg/lib/npa.js:158:11)
at new Result (/home/admin/app/node_modules/npm-package-arg/lib/npa.js:147:10)
at resolve (/home/admin/app/node_modules/npm-package-arg/lib/npa.js:59:15)
at npa (/home/admin/app/node_modules/npm-package-arg/lib/npa.js:53:10)
at PackageSemVerRequestAdvice.around (/home/admin/app/app/npm/biz/PackageSemVerRequestAdvice.js:32:54)
at /home/admin/app/node_modules/@eggjs/tegg-aop-runtime/dist/src/AspectExecutor.js:81:37
at dispatch (/home/admin/app/node_modules/koa-compose/index.js:42:32)
at /home/admin/app/node_modules/koa-compose/index.js:34:12
at AspectExecutor.doExecute (/home/admin/app/node_modules/@eggjs/tegg-aop-runtime/dist/src/AspectExecutor.js:86:53)
at AspectExecutor.execute (/home/admin/app/node_modules/@eggjs/tegg-aop-runtime/dist/src/AspectExecutor.js:22:39)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.<anonymous> (/home/admin/app/node_modules/@eggjs/tegg-controller-plugin/lib/impl/http/HTTPMethodRegister.js:76:26)
at async AlwaysAuth (/home/admin/app/node_modules/cnpmcore/dist/app/port/middleware/AlwaysAuth.js:14:5)
at async Tracing (/home/admin/app/node_modules/cnpmcore/dist/app/port/middleware/Tracing.js:19:5)
code: "EINVALIDPACKAGENAME"
name: "EINVALIDPACKAGENAMEError"