@snyk/error-catalog-nodejs-public 3.16.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/README.md +7 -0
- package/package.json +15 -0
- package/src/catalogs/Fix-error-catalog.d.ts +100 -0
- package/src/catalogs/Fix-error-catalog.js +180 -0
- package/src/catalogs/Fix-error-catalog.js.map +1 -0
- package/src/catalogs/IsolatedBuilds-error-catalog.d.ts +32 -0
- package/src/catalogs/IsolatedBuilds-error-catalog.js +60 -0
- package/src/catalogs/IsolatedBuilds-error-catalog.js.map +1 -0
- package/src/catalogs/OpenAPI-error-catalog.d.ts +119 -0
- package/src/catalogs/OpenAPI-error-catalog.js +215 -0
- package/src/catalogs/OpenAPI-error-catalog.js.map +1 -0
- package/src/catalogs/OpenSourceEcosystems-error-catalog.d.ts +771 -0
- package/src/catalogs/OpenSourceEcosystems-error-catalog.js +1371 -0
- package/src/catalogs/OpenSourceEcosystems-error-catalog.js.map +1 -0
- package/src/catalogs/OpenSourceProjectIssues-error-catalog.d.ts +71 -0
- package/src/catalogs/OpenSourceProjectIssues-error-catalog.js +130 -0
- package/src/catalogs/OpenSourceProjectIssues-error-catalog.js.map +1 -0
- package/src/catalogs/OpenSourceProjectSnapshots-error-catalog.d.ts +71 -0
- package/src/catalogs/OpenSourceProjectSnapshots-error-catalog.js +130 -0
- package/src/catalogs/OpenSourceProjectSnapshots-error-catalog.js.map +1 -0
- package/src/catalogs/OpenSourceUnmanaged-error-catalog.d.ts +36 -0
- package/src/catalogs/OpenSourceUnmanaged-error-catalog.js +67 -0
- package/src/catalogs/OpenSourceUnmanaged-error-catalog.js.map +1 -0
- package/src/catalogs/PurlVulnerabilityFetching-error-catalog.d.ts +290 -0
- package/src/catalogs/PurlVulnerabilityFetching-error-catalog.js +520 -0
- package/src/catalogs/PurlVulnerabilityFetching-error-catalog.js.map +1 -0
- package/src/catalogs/SbomExport-error-catalog.d.ts +130 -0
- package/src/catalogs/SbomExport-error-catalog.js +235 -0
- package/src/catalogs/SbomExport-error-catalog.js.map +1 -0
- package/src/catalogs/Snyk-error-catalog.d.ts +94 -0
- package/src/catalogs/Snyk-error-catalog.js +170 -0
- package/src/catalogs/Snyk-error-catalog.js.map +1 -0
- package/src/catalogs/error-catalog.d.ts +10 -0
- package/src/catalogs/error-catalog.js +14 -0
- package/src/catalogs/error-catalog.js.map +1 -0
- package/src/catalogs/error-codes.d.ts +138 -0
- package/src/catalogs/error-codes.js +140 -0
- package/src/catalogs/error-codes.js.map +1 -0
- package/src/composite-error.d.ts +13 -0
- package/src/composite-error.js +27 -0
- package/src/composite-error.js.map +1 -0
- package/src/index.d.ts +3 -0
- package/src/index.js +7 -0
- package/src/index.js.map +1 -0
- package/src/problem-error.d.ts +20 -0
- package/src/problem-error.js +78 -0
- package/src/problem-error.js.map +1 -0
- package/src/types.d.ts +66 -0
- package/src/types.js +35 -0
- package/src/types.js.map +1 -0
- package/src/util/index.d.ts +1 -0
- package/src/util/index.js +5 -0
- package/src/util/index.js.map +1 -0
- package/src/util/json-api.d.ts +7 -0
- package/src/util/json-api.js +70 -0
- package/src/util/json-api.js.map +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# error-catalog-nodejs-public
|
|
2
|
+
|
|
3
|
+
A public-facing copy of [error-catalog-nodejs](../error-catalog-nodejs) which copies most of the existing functionality
|
|
4
|
+
while only disclosing non-internal errors to the published NPM package.
|
|
5
|
+
|
|
6
|
+
Most of the logic in `project.json` is either directly or indirectly based off of the non-public `error-catalog-nodejs`,
|
|
7
|
+
and thus changes done there will reflect changes in this repository. They should be viewed as the same entity.
|
package/package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@snyk/error-catalog-nodejs-public",
|
|
3
|
+
"version": "3.16.0",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"author": "snyk.io",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/",
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"peerDependencies": {
|
|
12
|
+
"@snyk/error-catalog-data": "3.15.0"
|
|
13
|
+
},
|
|
14
|
+
"main": "./src/index.js"
|
|
15
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { ProblemError } from '../problem-error';
|
|
2
|
+
/**
|
|
3
|
+
* @class
|
|
4
|
+
* @name FailedToGetPullRequestAttributesError
|
|
5
|
+
* @description Snyk could not get the custom pull request template attributes, using the given variables and the fetched pr template.
|
|
6
|
+
*
|
|
7
|
+
* See more:
|
|
8
|
+
* - [https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta](https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta)
|
|
9
|
+
* @summary Failed to get pull request attributes
|
|
10
|
+
* @category Fix
|
|
11
|
+
* @param {string} details the specific details that causes this error
|
|
12
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
13
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
14
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
15
|
+
*/
|
|
16
|
+
export declare class FailedToGetPullRequestAttributesError extends ProblemError {
|
|
17
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @class
|
|
21
|
+
* @name PullRequestTemplateNotFoundError
|
|
22
|
+
* @description Could not find pull request template.
|
|
23
|
+
* @summary Not found
|
|
24
|
+
* @category Fix
|
|
25
|
+
* @param {string} details the specific details that causes this error
|
|
26
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
27
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
28
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
29
|
+
*/
|
|
30
|
+
export declare class PullRequestTemplateNotFoundError extends ProblemError {
|
|
31
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @class
|
|
35
|
+
* @name FailedToCompilePrTemplateError
|
|
36
|
+
* @description Could not compile your customize pull request template, using Handlebars compilation and Snyk variables in place.
|
|
37
|
+
*
|
|
38
|
+
* See more:
|
|
39
|
+
* - [https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta](https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta)
|
|
40
|
+
* @summary Failed to compile pull request template
|
|
41
|
+
* @category Fix
|
|
42
|
+
* @param {string} details the specific details that causes this error
|
|
43
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
44
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
45
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
46
|
+
*/
|
|
47
|
+
export declare class FailedToCompilePrTemplateError extends ProblemError {
|
|
48
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @class
|
|
52
|
+
* @name FailedToParsePullRequestAttributesError
|
|
53
|
+
* @description Snyk could not parse the custom pull request template, using the given variables and assigning them to the fetched pr template.
|
|
54
|
+
*
|
|
55
|
+
* See more:
|
|
56
|
+
* - [https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta](https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta)
|
|
57
|
+
* @summary Failed to parse pull request attributes
|
|
58
|
+
* @category Fix
|
|
59
|
+
* @param {string} details the specific details that causes this error
|
|
60
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
61
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
62
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
63
|
+
*/
|
|
64
|
+
export declare class FailedToParsePullRequestAttributesError extends ProblemError {
|
|
65
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @class
|
|
69
|
+
* @name FailedToLoadCompiledYamlError
|
|
70
|
+
* @description Could not load YAML file after substituting Snyk variables into the custom PR template.
|
|
71
|
+
*
|
|
72
|
+
* See more:
|
|
73
|
+
* - [https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta](https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta)
|
|
74
|
+
* @summary Failed to load YAML file after substituting Snyk variables
|
|
75
|
+
* @category Fix
|
|
76
|
+
* @param {string} details the specific details that causes this error
|
|
77
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
78
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
79
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
80
|
+
*/
|
|
81
|
+
export declare class FailedToLoadCompiledYamlError extends ProblemError {
|
|
82
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @class
|
|
86
|
+
* @name FailedToGenerateHashError
|
|
87
|
+
* @description Snyk could not generate hash using the customer PR files and projects vulnIds.
|
|
88
|
+
*
|
|
89
|
+
* See more:
|
|
90
|
+
* - [https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta](https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta)
|
|
91
|
+
* @summary Failed to generate hash for custom PR template
|
|
92
|
+
* @category Fix
|
|
93
|
+
* @param {string} details the specific details that causes this error
|
|
94
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
95
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
96
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
97
|
+
*/
|
|
98
|
+
export declare class FailedToGenerateHashError extends ProblemError {
|
|
99
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
100
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FailedToGenerateHashError = exports.FailedToLoadCompiledYamlError = exports.FailedToParsePullRequestAttributesError = exports.FailedToCompilePrTemplateError = exports.PullRequestTemplateNotFoundError = exports.FailedToGetPullRequestAttributesError = void 0;
|
|
4
|
+
const problem_error_1 = require("../problem-error");
|
|
5
|
+
/**
|
|
6
|
+
* @class
|
|
7
|
+
* @name FailedToGetPullRequestAttributesError
|
|
8
|
+
* @description Snyk could not get the custom pull request template attributes, using the given variables and the fetched pr template.
|
|
9
|
+
*
|
|
10
|
+
* See more:
|
|
11
|
+
* - [https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta](https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta)
|
|
12
|
+
* @summary Failed to get pull request attributes
|
|
13
|
+
* @category Fix
|
|
14
|
+
* @param {string} details the specific details that causes this error
|
|
15
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
16
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
17
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
18
|
+
*/
|
|
19
|
+
class FailedToGetPullRequestAttributesError extends problem_error_1.ProblemError {
|
|
20
|
+
constructor(details, additionalData, cause, instance) {
|
|
21
|
+
super({
|
|
22
|
+
title: 'Failed to get pull request attributes',
|
|
23
|
+
type: 'https://docs.snyk.io/more-info/error-catalog#snyk-pr-template-0001',
|
|
24
|
+
status: 500,
|
|
25
|
+
errorCode: 'SNYK-PR-TEMPLATE-0001',
|
|
26
|
+
level: 'error',
|
|
27
|
+
instance,
|
|
28
|
+
}, details, Object.assign({ links: [
|
|
29
|
+
'https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta',
|
|
30
|
+
] }, additionalData), cause);
|
|
31
|
+
this.name = this.constructor.name;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.FailedToGetPullRequestAttributesError = FailedToGetPullRequestAttributesError;
|
|
35
|
+
/**
|
|
36
|
+
* @class
|
|
37
|
+
* @name PullRequestTemplateNotFoundError
|
|
38
|
+
* @description Could not find pull request template.
|
|
39
|
+
* @summary Not found
|
|
40
|
+
* @category Fix
|
|
41
|
+
* @param {string} details the specific details that causes this error
|
|
42
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
43
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
44
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
45
|
+
*/
|
|
46
|
+
class PullRequestTemplateNotFoundError extends problem_error_1.ProblemError {
|
|
47
|
+
constructor(details, additionalData, cause, instance) {
|
|
48
|
+
super({
|
|
49
|
+
title: 'Not found',
|
|
50
|
+
type: 'https://docs.snyk.io/more-info/error-catalog#snyk-pr-template-0002',
|
|
51
|
+
status: 404,
|
|
52
|
+
errorCode: 'SNYK-PR-TEMPLATE-0002',
|
|
53
|
+
level: 'error',
|
|
54
|
+
instance,
|
|
55
|
+
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
56
|
+
this.name = this.constructor.name;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.PullRequestTemplateNotFoundError = PullRequestTemplateNotFoundError;
|
|
60
|
+
/**
|
|
61
|
+
* @class
|
|
62
|
+
* @name FailedToCompilePrTemplateError
|
|
63
|
+
* @description Could not compile your customize pull request template, using Handlebars compilation and Snyk variables in place.
|
|
64
|
+
*
|
|
65
|
+
* See more:
|
|
66
|
+
* - [https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta](https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta)
|
|
67
|
+
* @summary Failed to compile pull request template
|
|
68
|
+
* @category Fix
|
|
69
|
+
* @param {string} details the specific details that causes this error
|
|
70
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
71
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
72
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
73
|
+
*/
|
|
74
|
+
class FailedToCompilePrTemplateError extends problem_error_1.ProblemError {
|
|
75
|
+
constructor(details, additionalData, cause, instance) {
|
|
76
|
+
super({
|
|
77
|
+
title: 'Failed to compile pull request template',
|
|
78
|
+
type: 'https://docs.snyk.io/more-info/error-catalog#snyk-pr-template-0003',
|
|
79
|
+
status: 400,
|
|
80
|
+
errorCode: 'SNYK-PR-TEMPLATE-0003',
|
|
81
|
+
level: 'error',
|
|
82
|
+
instance,
|
|
83
|
+
}, details, Object.assign({ links: [
|
|
84
|
+
'https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta',
|
|
85
|
+
] }, additionalData), cause);
|
|
86
|
+
this.name = this.constructor.name;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.FailedToCompilePrTemplateError = FailedToCompilePrTemplateError;
|
|
90
|
+
/**
|
|
91
|
+
* @class
|
|
92
|
+
* @name FailedToParsePullRequestAttributesError
|
|
93
|
+
* @description Snyk could not parse the custom pull request template, using the given variables and assigning them to the fetched pr template.
|
|
94
|
+
*
|
|
95
|
+
* See more:
|
|
96
|
+
* - [https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta](https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta)
|
|
97
|
+
* @summary Failed to parse pull request attributes
|
|
98
|
+
* @category Fix
|
|
99
|
+
* @param {string} details the specific details that causes this error
|
|
100
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
101
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
102
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
103
|
+
*/
|
|
104
|
+
class FailedToParsePullRequestAttributesError extends problem_error_1.ProblemError {
|
|
105
|
+
constructor(details, additionalData, cause, instance) {
|
|
106
|
+
super({
|
|
107
|
+
title: 'Failed to parse pull request attributes',
|
|
108
|
+
type: 'https://docs.snyk.io/more-info/error-catalog#snyk-pr-template-0004',
|
|
109
|
+
status: 500,
|
|
110
|
+
errorCode: 'SNYK-PR-TEMPLATE-0004',
|
|
111
|
+
level: 'error',
|
|
112
|
+
instance,
|
|
113
|
+
}, details, Object.assign({ links: [
|
|
114
|
+
'https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta',
|
|
115
|
+
] }, additionalData), cause);
|
|
116
|
+
this.name = this.constructor.name;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
exports.FailedToParsePullRequestAttributesError = FailedToParsePullRequestAttributesError;
|
|
120
|
+
/**
|
|
121
|
+
* @class
|
|
122
|
+
* @name FailedToLoadCompiledYamlError
|
|
123
|
+
* @description Could not load YAML file after substituting Snyk variables into the custom PR template.
|
|
124
|
+
*
|
|
125
|
+
* See more:
|
|
126
|
+
* - [https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta](https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta)
|
|
127
|
+
* @summary Failed to load YAML file after substituting Snyk variables
|
|
128
|
+
* @category Fix
|
|
129
|
+
* @param {string} details the specific details that causes this error
|
|
130
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
131
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
132
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
133
|
+
*/
|
|
134
|
+
class FailedToLoadCompiledYamlError extends problem_error_1.ProblemError {
|
|
135
|
+
constructor(details, additionalData, cause, instance) {
|
|
136
|
+
super({
|
|
137
|
+
title: 'Failed to load YAML file after substituting Snyk variables',
|
|
138
|
+
type: 'https://docs.snyk.io/more-info/error-catalog#snyk-pr-template-0005',
|
|
139
|
+
status: 400,
|
|
140
|
+
errorCode: 'SNYK-PR-TEMPLATE-0005',
|
|
141
|
+
level: 'error',
|
|
142
|
+
instance,
|
|
143
|
+
}, details, Object.assign({ links: [
|
|
144
|
+
'https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta',
|
|
145
|
+
] }, additionalData), cause);
|
|
146
|
+
this.name = this.constructor.name;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
exports.FailedToLoadCompiledYamlError = FailedToLoadCompiledYamlError;
|
|
150
|
+
/**
|
|
151
|
+
* @class
|
|
152
|
+
* @name FailedToGenerateHashError
|
|
153
|
+
* @description Snyk could not generate hash using the customer PR files and projects vulnIds.
|
|
154
|
+
*
|
|
155
|
+
* See more:
|
|
156
|
+
* - [https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta](https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta)
|
|
157
|
+
* @summary Failed to generate hash for custom PR template
|
|
158
|
+
* @category Fix
|
|
159
|
+
* @param {string} details the specific details that causes this error
|
|
160
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
161
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
162
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
163
|
+
*/
|
|
164
|
+
class FailedToGenerateHashError extends problem_error_1.ProblemError {
|
|
165
|
+
constructor(details, additionalData, cause, instance) {
|
|
166
|
+
super({
|
|
167
|
+
title: 'Failed to generate hash for custom PR template',
|
|
168
|
+
type: 'https://docs.snyk.io/more-info/error-catalog#snyk-pr-template-0006',
|
|
169
|
+
status: 500,
|
|
170
|
+
errorCode: 'SNYK-PR-TEMPLATE-0006',
|
|
171
|
+
level: 'error',
|
|
172
|
+
instance,
|
|
173
|
+
}, details, Object.assign({ links: [
|
|
174
|
+
'https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta',
|
|
175
|
+
] }, additionalData), cause);
|
|
176
|
+
this.name = this.constructor.name;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
exports.FailedToGenerateHashError = FailedToGenerateHashError;
|
|
180
|
+
//# sourceMappingURL=Fix-error-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fix-error-catalog.js","sourceRoot":"","sources":["../../../../../packages/error-catalog-nodejs-public/src/catalogs/Fix-error-catalog.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ProblemError } from '../problem-error';
|
|
2
|
+
/**
|
|
3
|
+
* @class
|
|
4
|
+
* @name InvalidRequestError
|
|
5
|
+
* @description The provided request payload is not valid for the selected ecosystem. Please review the API documentation.
|
|
6
|
+
*
|
|
7
|
+
* See more:
|
|
8
|
+
* - [https://apidocs.snyk.io/](https://apidocs.snyk.io/)
|
|
9
|
+
* @summary Invalid request
|
|
10
|
+
* @category IsolatedBuilds
|
|
11
|
+
* @param {string} details the specific details that causes this error
|
|
12
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
13
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
14
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
15
|
+
*/
|
|
16
|
+
export declare class InvalidRequestError extends ProblemError {
|
|
17
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @class
|
|
21
|
+
* @name BuildEnvironmentNotFoundError
|
|
22
|
+
* @description The build environment for the provided context could not be found. Please ensure you have created the build environment first.
|
|
23
|
+
* @summary Build environment not found
|
|
24
|
+
* @category IsolatedBuilds
|
|
25
|
+
* @param {string} details the specific details that causes this error
|
|
26
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
27
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
28
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
29
|
+
*/
|
|
30
|
+
export declare class BuildEnvironmentNotFoundError extends ProblemError {
|
|
31
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
32
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BuildEnvironmentNotFoundError = exports.InvalidRequestError = void 0;
|
|
4
|
+
const problem_error_1 = require("../problem-error");
|
|
5
|
+
/**
|
|
6
|
+
* @class
|
|
7
|
+
* @name InvalidRequestError
|
|
8
|
+
* @description The provided request payload is not valid for the selected ecosystem. Please review the API documentation.
|
|
9
|
+
*
|
|
10
|
+
* See more:
|
|
11
|
+
* - [https://apidocs.snyk.io/](https://apidocs.snyk.io/)
|
|
12
|
+
* @summary Invalid request
|
|
13
|
+
* @category IsolatedBuilds
|
|
14
|
+
* @param {string} details the specific details that causes this error
|
|
15
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
16
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
17
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
18
|
+
*/
|
|
19
|
+
class InvalidRequestError extends problem_error_1.ProblemError {
|
|
20
|
+
constructor(details, additionalData, cause, instance) {
|
|
21
|
+
super({
|
|
22
|
+
title: 'Invalid request',
|
|
23
|
+
type: 'https://docs.snyk.io/more-info/error-catalog#snyk-os-8001',
|
|
24
|
+
status: 400,
|
|
25
|
+
errorCode: 'SNYK-OS-8001',
|
|
26
|
+
level: 'error',
|
|
27
|
+
instance,
|
|
28
|
+
}, details, Object.assign({ links: [
|
|
29
|
+
'https://apidocs.snyk.io/',
|
|
30
|
+
] }, additionalData), cause);
|
|
31
|
+
this.name = this.constructor.name;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.InvalidRequestError = InvalidRequestError;
|
|
35
|
+
/**
|
|
36
|
+
* @class
|
|
37
|
+
* @name BuildEnvironmentNotFoundError
|
|
38
|
+
* @description The build environment for the provided context could not be found. Please ensure you have created the build environment first.
|
|
39
|
+
* @summary Build environment not found
|
|
40
|
+
* @category IsolatedBuilds
|
|
41
|
+
* @param {string} details the specific details that causes this error
|
|
42
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
43
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
44
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
45
|
+
*/
|
|
46
|
+
class BuildEnvironmentNotFoundError extends problem_error_1.ProblemError {
|
|
47
|
+
constructor(details, additionalData, cause, instance) {
|
|
48
|
+
super({
|
|
49
|
+
title: 'Build environment not found',
|
|
50
|
+
type: 'https://docs.snyk.io/more-info/error-catalog#snyk-os-8002',
|
|
51
|
+
status: 404,
|
|
52
|
+
errorCode: 'SNYK-OS-8002',
|
|
53
|
+
level: 'warn',
|
|
54
|
+
instance,
|
|
55
|
+
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
56
|
+
this.name = this.constructor.name;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.BuildEnvironmentNotFoundError = BuildEnvironmentNotFoundError;
|
|
60
|
+
//# sourceMappingURL=IsolatedBuilds-error-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsolatedBuilds-error-catalog.js","sourceRoot":"","sources":["../../../../../packages/error-catalog-nodejs-public/src/catalogs/IsolatedBuilds-error-catalog.ts"],"names":[],"mappings":";;;AAAA,oDAAgD;AAEhD;;;;;;;;;;;;;GAaG;AACH,MAAa,mBAAoB,SAAQ,4BAAY;IACnD,YACI,OAAe,EACf,cAAoC,EACpC,KAAa,EACb,QAAiB;QAEnB,KAAK,CACH;YACE,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,2DAA2D;YACjE,MAAM,EAAE,GAAG;YACX,SAAS,EAAE,cAAc;YACzB,KAAK,EAAE,OAAO;YACd,QAAQ;SACT,EACD,OAAO,kBAEL,KAAK,EAAE;gBACP,0BAA0B;aACzB,IACE,cAAc,GAEnB,KAAK,CACN,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACpC,CAAC;CACF;AA3BD,kDA2BC;AAED;;;;;;;;;;GAUG;AACH,MAAa,6BAA8B,SAAQ,4BAAY;IAC7D,YACI,OAAe,EACf,cAAoC,EACpC,KAAa,EACb,QAAiB;QAEnB,KAAK,CACH;YACE,KAAK,EAAE,6BAA6B;YACpC,IAAI,EAAE,2DAA2D;YACjE,MAAM,EAAE,GAAG;YACX,SAAS,EAAE,cAAc;YACzB,KAAK,EAAE,MAAM;YACb,QAAQ;SACT,EACD,OAAO,kBAEL,KAAK,EAAE,EAAE,IACN,cAAc,GAEnB,KAAK,CACN,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACpC,CAAC;CACF;AAzBD,sEAyBC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { ProblemError } from '../problem-error';
|
|
2
|
+
/**
|
|
3
|
+
* @class
|
|
4
|
+
* @name BadRequestError
|
|
5
|
+
* @description The server cannot process the request due to invalid or corrupt data. Review the request, then try again.
|
|
6
|
+
*
|
|
7
|
+
* See more:
|
|
8
|
+
* - [https://docs.snyk.io/snyk-api-info/getting-started-using-snyk-rest-api ](https://docs.snyk.io/snyk-api-info/getting-started-using-snyk-rest-api )
|
|
9
|
+
* @summary Bad request
|
|
10
|
+
* @category OpenAPI
|
|
11
|
+
* @param {string} details the specific details that causes this error
|
|
12
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
13
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
14
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
15
|
+
*/
|
|
16
|
+
export declare class BadRequestError extends ProblemError {
|
|
17
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @class
|
|
21
|
+
* @name ForbiddenError
|
|
22
|
+
* @description Access to the requested resource is forbidden.
|
|
23
|
+
* @summary Forbidden
|
|
24
|
+
* @category OpenAPI
|
|
25
|
+
* @param {string} details the specific details that causes this error
|
|
26
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
27
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
28
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
29
|
+
*/
|
|
30
|
+
export declare class ForbiddenError extends ProblemError {
|
|
31
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @class
|
|
35
|
+
* @name NotAcceptableError
|
|
36
|
+
* @description The server cannot provide a response that matches the provided accept headers. Review the request, then try again.
|
|
37
|
+
* @summary Not acceptable
|
|
38
|
+
* @category OpenAPI
|
|
39
|
+
* @param {string} details the specific details that causes this error
|
|
40
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
41
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
42
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
43
|
+
*/
|
|
44
|
+
export declare class NotAcceptableError extends ProblemError {
|
|
45
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @class
|
|
49
|
+
* @name NotFoundError
|
|
50
|
+
* @description The server cannot find the requested resource.
|
|
51
|
+
* @summary Not found
|
|
52
|
+
* @category OpenAPI
|
|
53
|
+
* @param {string} details the specific details that causes this error
|
|
54
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
55
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
56
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
57
|
+
*/
|
|
58
|
+
export declare class NotFoundError extends ProblemError {
|
|
59
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @class
|
|
63
|
+
* @name MethodNotAllowedError
|
|
64
|
+
* @description The target endpoint does not support your request method. Review the request, then try again.
|
|
65
|
+
* @summary Method not allowed
|
|
66
|
+
* @category OpenAPI
|
|
67
|
+
* @param {string} details the specific details that causes this error
|
|
68
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
69
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
70
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
71
|
+
*/
|
|
72
|
+
export declare class MethodNotAllowedError extends ProblemError {
|
|
73
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @class
|
|
77
|
+
* @name RequestEntityTooLargeError
|
|
78
|
+
* @description The request entity exceeds server limitations.
|
|
79
|
+
* @summary Request entity too large
|
|
80
|
+
* @category OpenAPI
|
|
81
|
+
* @param {string} details the specific details that causes this error
|
|
82
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
83
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
84
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
85
|
+
*/
|
|
86
|
+
export declare class RequestEntityTooLargeError extends ProblemError {
|
|
87
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @class
|
|
91
|
+
* @name UnauthorizedError
|
|
92
|
+
* @description The request lacks authentication credentials for the requested resource.
|
|
93
|
+
*
|
|
94
|
+
* See more:
|
|
95
|
+
* - [https://docs.snyk.io/snyk-api-info/authentication-for-api ](https://docs.snyk.io/snyk-api-info/authentication-for-api )
|
|
96
|
+
* @summary Unauthorized
|
|
97
|
+
* @category OpenAPI
|
|
98
|
+
* @param {string} details the specific details that causes this error
|
|
99
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
100
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
101
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
102
|
+
*/
|
|
103
|
+
export declare class UnauthorizedError extends ProblemError {
|
|
104
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* @class
|
|
108
|
+
* @name UnsupportedMediaTypeError
|
|
109
|
+
* @description The media format of the request is not supported.
|
|
110
|
+
* @summary Unsupported media type
|
|
111
|
+
* @category OpenAPI
|
|
112
|
+
* @param {string} details the specific details that causes this error
|
|
113
|
+
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
114
|
+
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
115
|
+
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
116
|
+
*/
|
|
117
|
+
export declare class UnsupportedMediaTypeError extends ProblemError {
|
|
118
|
+
constructor(details: string, additionalData?: Record<string, any>, cause?: Error, instance?: string);
|
|
119
|
+
}
|