Socket
Socket
Sign inDemoInstall

@snyk/error-catalog-nodejs-public

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snyk/error-catalog-nodejs-public - npm Package Compare versions

Comparing version 5.5.1 to 5.6.0

src/catalogs/PRChecks-error-catalog.d.ts

2

package.json
{
"name": "@snyk/error-catalog-nodejs-public",
"version": "5.5.1",
"version": "5.6.0",
"type": "commonjs",

@@ -5,0 +5,0 @@ "author": "snyk.io",

@@ -27,1 +27,2 @@ /*

export * as Code from './Code-error-catalog';
export * as PRChecks from './PRChecks-error-catalog';

@@ -18,3 +18,3 @@ /*

Object.defineProperty(exports, "__esModule", { value: true });
exports.Code = exports.Fix = exports.SbomExport = exports.OpenSourceUnmanaged = exports.OpenAPI = exports.IsolatedBuilds = exports.PurlVulnerabilityFetching = exports.OpenSourceProjectIssues = exports.OpenSourceProjectSnapshots = exports.OpenSourceEcosystems = exports.Snyk = void 0;
exports.PRChecks = exports.Code = exports.Fix = exports.SbomExport = exports.OpenSourceUnmanaged = exports.OpenAPI = exports.IsolatedBuilds = exports.PurlVulnerabilityFetching = exports.OpenSourceProjectIssues = exports.OpenSourceProjectSnapshots = exports.OpenSourceEcosystems = exports.Snyk = void 0;
exports.Snyk = require("./Snyk-error-catalog");

@@ -31,2 +31,3 @@ exports.OpenSourceEcosystems = require("./OpenSourceEcosystems-error-catalog");

exports.Code = require("./Code-error-catalog");
exports.PRChecks = require("./PRChecks-error-catalog");
//# sourceMappingURL=error-catalog.js.map

@@ -162,3 +162,6 @@ /*

};
PRChecks: {
FailedToReadManifest: string;
};
};
export default _default;

@@ -164,3 +164,6 @@ /*

},
PRChecks: {
FailedToReadManifest: 'SNYK-PR-CHECK-0001',
},
};
//# sourceMappingURL=error-codes.js.map

@@ -350,12 +350,12 @@ /*

* @name UnableToAccessPrivateDepsError
* @description The Go tool encountered a `DepsError` while trying to download a private dependency. Private repositories that are not accessible to the public internet, and this not available on the official Go proxy mirror, are cloned with a version control system and built on-demand.
* @description The Go tool encountered a `DepsError` while trying to download a private dependency. Private repositories that are not accessible to the public internet and are not available on the official Go proxy mirror are cloned with a version control system and built on demand.
* This requires the VCS to have the correct access rights to that repository.
*
* Snyk supports private repositories hosted on the same organization and the project being scanned for vulnerabilities. The authentication Snyk uses, is the same as the one you have used with your Snyk integration to the same repository.
* Snyk supports private repositories that are hosted in the same Organization and on the same Project that is scanned for vulnerabilities. The authentication to the private repository is the same as the authentication used to integrate that repository with Snyk.
*
* If those credentials are not allowed to access the private dependency being requested, this error is thrown.
* This error appears when the authorization credentials do not allow access to the requested private dependency.
*
* See more:
* - [https://go.dev/ref/mod#vcs](https://go.dev/ref/mod#vcs)
* @summary Authorization problem with private dependencies
* @summary Unable to access private dependencies
* @category OpenSourceEcosystems

@@ -362,0 +362,0 @@ * @param {string} details the specific details that causes this error

@@ -16,3 +16,3 @@ /*

*/
import { ErrorFormats, ErrorMetadata, JsonApi, JsonApiErrorObject, ProblemJson } from './types';
import { ErrorFormats, ErrorMetadata, JsonApi, JsonApiErrorObject, JsonApiErrors, ProblemJson } from './types';
export declare class ProblemError extends Error {

@@ -23,3 +23,3 @@ readonly metadata: ErrorMetadata;

readonly cause?: Error | undefined;
private id;
private readonly id;
readonly isErrorCatalogError = true;

@@ -37,2 +37,4 @@ constructor(metadata: ErrorMetadata, detail: string, additionalData?: Record<string, any> | undefined, cause?: Error | undefined);

toJsonApi(instance?: string): JsonApi;
static fromJsonApiErrorObject(obj: JsonApiErrorObject): ProblemError;
static fromJsonApi(jsonApi: JsonApiErrors): ProblemError[];
}

@@ -75,4 +75,3 @@ /*

detail: this.detail,
classification: this.metadata.classification,
meta: Object.assign({}, this.additionalData),
meta: Object.assign(Object.assign({}, this.additionalData), { isErrorCatalogError: true, classification: this.metadata.classification }),
};

@@ -93,4 +92,31 @@ if (source) {

}
static fromJsonApiErrorObject(obj) {
var _a, _b;
const metadata = {
title: obj.title,
errorCode: obj.code,
type: (_a = obj.links) === null || _a === void 0 ? void 0 : _a.about,
status: Number(obj.status),
classification: (_b = obj.meta) === null || _b === void 0 ? void 0 : _b.classification,
};
const additionalData = Object.assign(Object.assign({}, obj.meta), {
// We need to add an override if we want to preserve the same id across invocations of this function,
// as that otherwise gets generated automatically from a UUID whenever a new ProblemError is instantiated.
overrideErrorId: obj.id });
const instance = new ProblemError(metadata, obj.detail, additionalData);
// Remove it again to ensure we don't change the signature of the incoming object
if (instance.additionalData && instance.additionalData['overrideErrorId']) {
delete instance.additionalData['overrideErrorId'];
}
return instance;
}
static fromJsonApi(jsonApi) {
const problemErrors = [];
jsonApi.errors.forEach((err) => {
problemErrors.push(this.fromJsonApiErrorObject(err));
});
return problemErrors;
}
}
exports.ProblemError = ProblemError;
//# sourceMappingURL=problem-error.js.map

@@ -72,6 +72,7 @@ /*

detail: string;
classification: Classification;
source?: JsonApiErrorSource;
meta?: {
[x: string]: any;
isErrorCatalogError: boolean;
classification?: Classification;
};

@@ -78,0 +79,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc