Skip to content
18 changes: 10 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"@snyk/code-client": "^4.23.5",
"@snyk/dep-graph": "^2.7.4",
"@snyk/docker-registry-v2-client": "^2.24.1",
"@snyk/error-catalog-nodejs-public": "^5.72.0",
"@snyk/error-catalog-nodejs-public": "^5.77.0",
"@snyk/fix": "file:packages/snyk-fix",
"@snyk/gemfile": "1.2.0",
"@snyk/snyk-cocoapods-plugin": "3.1.0",
Expand Down Expand Up @@ -127,7 +127,7 @@
"snyk-nuget-plugin": "4.1.1",
"snyk-php-plugin": "1.12.1",
"snyk-policy": "^4.1.6",
"snyk-python-plugin": "3.1.6",
"snyk-python-plugin": "^3.2.0",
"snyk-resolve-deps": "4.10.0",
"snyk-sbt-plugin": "3.1.0",
"snyk-swiftpm-plugin": "1.4.1",
Expand Down
9 changes: 8 additions & 1 deletion src/lib/snyk-test/run-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,20 @@ export async function runTest(
throw new DockerImageNotFoundError(root);
}

let catalogError: ProblemError | undefined;
if (error instanceof ProblemError || error.isErrorCatalogError) {
catalogError = error as ProblemError;
} else {
catalogError = error.errorCatalog;
}

throw new FailedToRunTestError(
error.userMessage ||
error.message ||
`Failed to test ${projectType} project`,
error.code,
error.innerError,
error instanceof ProblemError ? error : error.errorCatalog,
catalogError,
);
} finally {
spinner.clear<void>(spinnerLbl)();
Expand Down
Loading