snyk 1.847.0 → 1.848.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/293.index.js
CHANGED
|
@@ -5280,7 +5280,8 @@ const output_format_1 = __webpack_require__(75802);
|
|
|
5280
5280
|
const errors_1 = __webpack_require__(55191);
|
|
5281
5281
|
const json_1 = __webpack_require__(27019);
|
|
5282
5282
|
const analytics = __webpack_require__(82744);
|
|
5283
|
-
|
|
5283
|
+
debugLib.enable('snyk-code');
|
|
5284
|
+
const debug = debugLib('snyk-code');
|
|
5284
5285
|
exports.codePlugin = {
|
|
5285
5286
|
// We currently don't use scan/display. we will need to consolidate ecosystem plugins
|
|
5286
5287
|
// to accept flows that act differently in the `testDependencies` step, as we have here
|
|
@@ -5340,7 +5341,8 @@ exports.codePlugin = {
|
|
|
5340
5341
|
else {
|
|
5341
5342
|
err = new Error(error);
|
|
5342
5343
|
}
|
|
5343
|
-
debug(chalk_1.default.bold.red(error.
|
|
5344
|
+
debug(chalk_1.default.bold.red(`statusCode:${error.code ||
|
|
5345
|
+
error.statusCode}, message: ${error.statusText || error.message}`));
|
|
5344
5346
|
throw err;
|
|
5345
5347
|
}
|
|
5346
5348
|
},
|
|
@@ -5351,8 +5353,10 @@ function isCodeClientError(error) {
|
|
|
5351
5353
|
error.hasOwnProperty('apiName'));
|
|
5352
5354
|
}
|
|
5353
5355
|
function isUnauthorizedError(error) {
|
|
5354
|
-
return (
|
|
5355
|
-
|
|
5356
|
+
return (error.statusCode === 401 ||
|
|
5357
|
+
error.statusCode === 403 ||
|
|
5358
|
+
error.code === 403 ||
|
|
5359
|
+
error.code === 401);
|
|
5356
5360
|
}
|
|
5357
5361
|
function hasIssues(readableResult, sarifResult) {
|
|
5358
5362
|
const err = new Error(readableResult);
|