@snyk/error-catalog-nodejs-public 5.0.0 → 5.0.2
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/package.json +1 -1
- package/src/catalogs/Fix-error-catalog.d.ts +10 -0
- package/src/catalogs/Fix-error-catalog.js +21 -0
- package/src/catalogs/Fix-error-catalog.js.map +1 -1
- package/src/catalogs/IsolatedBuilds-error-catalog.d.ts +3 -0
- package/src/catalogs/IsolatedBuilds-error-catalog.js +7 -0
- package/src/catalogs/IsolatedBuilds-error-catalog.js.map +1 -1
- package/src/catalogs/OpenAPI-error-catalog.d.ts +8 -0
- package/src/catalogs/OpenAPI-error-catalog.js +17 -0
- package/src/catalogs/OpenAPI-error-catalog.js.map +1 -1
- package/src/catalogs/OpenSourceEcosystems-error-catalog.d.ts +52 -0
- package/src/catalogs/OpenSourceEcosystems-error-catalog.js +105 -0
- package/src/catalogs/OpenSourceEcosystems-error-catalog.js.map +1 -1
- package/src/catalogs/OpenSourceProjectIssues-error-catalog.d.ts +5 -0
- package/src/catalogs/OpenSourceProjectIssues-error-catalog.js +11 -0
- package/src/catalogs/OpenSourceProjectIssues-error-catalog.js.map +1 -1
- package/src/catalogs/OpenSourceProjectSnapshots-error-catalog.d.ts +5 -0
- package/src/catalogs/OpenSourceProjectSnapshots-error-catalog.js +11 -0
- package/src/catalogs/OpenSourceProjectSnapshots-error-catalog.js.map +1 -1
- package/src/catalogs/OpenSourceUnmanaged-error-catalog.d.ts +2 -0
- package/src/catalogs/OpenSourceUnmanaged-error-catalog.js +5 -0
- package/src/catalogs/OpenSourceUnmanaged-error-catalog.js.map +1 -1
- package/src/catalogs/PurlVulnerabilityFetching-error-catalog.d.ts +20 -0
- package/src/catalogs/PurlVulnerabilityFetching-error-catalog.js +41 -0
- package/src/catalogs/PurlVulnerabilityFetching-error-catalog.js.map +1 -1
- package/src/catalogs/SbomExport-error-catalog.d.ts +9 -0
- package/src/catalogs/SbomExport-error-catalog.js +19 -0
- package/src/catalogs/SbomExport-error-catalog.js.map +1 -1
- package/src/catalogs/Snyk-error-catalog.d.ts +6 -0
- package/src/catalogs/Snyk-error-catalog.js +13 -0
- package/src/catalogs/Snyk-error-catalog.js.map +1 -1
- package/src/problem-error.js +2 -1
- package/src/problem-error.js.map +1 -1
- package/src/types.d.ts +9 -1
- package/src/types.js +7 -1
- package/src/types.js.map +1 -1
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@ import { ProblemError } from '../problem-error';
|
|
|
24
24
|
* @summary Failed to get pull request attributes
|
|
25
25
|
* @category Fix
|
|
26
26
|
* @param {string} details the specific details that causes this error
|
|
27
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
27
28
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
28
29
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
29
30
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -38,6 +39,7 @@ export declare class FailedToGetPullRequestAttributesError extends ProblemError
|
|
|
38
39
|
* @summary Not found
|
|
39
40
|
* @category Fix
|
|
40
41
|
* @param {string} details the specific details that causes this error
|
|
42
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
41
43
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
42
44
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
43
45
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -55,6 +57,7 @@ export declare class PullRequestTemplateNotFoundError extends ProblemError {
|
|
|
55
57
|
* @summary Failed to compile pull request template
|
|
56
58
|
* @category Fix
|
|
57
59
|
* @param {string} details the specific details that causes this error
|
|
60
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
58
61
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
59
62
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
60
63
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -72,6 +75,7 @@ export declare class FailedToCompilePrTemplateError extends ProblemError {
|
|
|
72
75
|
* @summary Failed to parse pull request attributes
|
|
73
76
|
* @category Fix
|
|
74
77
|
* @param {string} details the specific details that causes this error
|
|
78
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
75
79
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
76
80
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
77
81
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -89,6 +93,7 @@ export declare class FailedToParsePullRequestAttributesError extends ProblemErro
|
|
|
89
93
|
* @summary Failed to load YAML file after substituting Snyk variables
|
|
90
94
|
* @category Fix
|
|
91
95
|
* @param {string} details the specific details that causes this error
|
|
96
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
92
97
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
93
98
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
94
99
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -106,6 +111,7 @@ export declare class FailedToLoadCompiledYamlError extends ProblemError {
|
|
|
106
111
|
* @summary Failed to generate hash for custom PR template
|
|
107
112
|
* @category Fix
|
|
108
113
|
* @param {string} details the specific details that causes this error
|
|
114
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
109
115
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
110
116
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
111
117
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -123,6 +129,7 @@ export declare class FailedToGenerateHashError extends ProblemError {
|
|
|
123
129
|
* @summary Unable to create pull request template
|
|
124
130
|
* @category Fix
|
|
125
131
|
* @param {string} details the specific details that causes this error
|
|
132
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
126
133
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
127
134
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
128
135
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -140,6 +147,7 @@ export declare class FailedToCreatePRTemplateError extends ProblemError {
|
|
|
140
147
|
* @summary Unable to get pull request template
|
|
141
148
|
* @category Fix
|
|
142
149
|
* @param {string} details the specific details that causes this error
|
|
150
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
143
151
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
144
152
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
145
153
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -157,6 +165,7 @@ export declare class FailedToReadPRTemplateError extends ProblemError {
|
|
|
157
165
|
* @summary Unable to delete pull request template
|
|
158
166
|
* @category Fix
|
|
159
167
|
* @param {string} details the specific details that causes this error
|
|
168
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
160
169
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
161
170
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
162
171
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -171,6 +180,7 @@ export declare class FailedToDeletePRTemplateError extends ProblemError {
|
|
|
171
180
|
* @summary Invalid payload
|
|
172
181
|
* @category Fix
|
|
173
182
|
* @param {string} details the specific details that causes this error
|
|
183
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
174
184
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
175
185
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
176
186
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"use strict";
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.PRTemplateInvalidPayloadError = exports.FailedToDeletePRTemplateError = exports.FailedToReadPRTemplateError = exports.FailedToCreatePRTemplateError = exports.FailedToGenerateHashError = exports.FailedToLoadCompiledYamlError = exports.FailedToParsePullRequestAttributesError = exports.FailedToCompilePrTemplateError = exports.PullRequestTemplateNotFoundError = exports.FailedToGetPullRequestAttributesError = void 0;
|
|
19
|
+
const types_1 = require("../types");
|
|
19
20
|
const problem_error_1 = require("../problem-error");
|
|
20
21
|
/**
|
|
21
22
|
* @class
|
|
@@ -27,6 +28,7 @@ const problem_error_1 = require("../problem-error");
|
|
|
27
28
|
* @summary Failed to get pull request attributes
|
|
28
29
|
* @category Fix
|
|
29
30
|
* @param {string} details the specific details that causes this error
|
|
31
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
30
32
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
31
33
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
32
34
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -39,6 +41,7 @@ class FailedToGetPullRequestAttributesError extends problem_error_1.ProblemError
|
|
|
39
41
|
status: 500,
|
|
40
42
|
errorCode: 'SNYK-PR-TEMPLATE-0001',
|
|
41
43
|
level: 'error',
|
|
44
|
+
classification: types_1.Classification.UNEXPECTED,
|
|
42
45
|
instance,
|
|
43
46
|
}, details, Object.assign({ links: [
|
|
44
47
|
'https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta',
|
|
@@ -54,6 +57,7 @@ exports.FailedToGetPullRequestAttributesError = FailedToGetPullRequestAttributes
|
|
|
54
57
|
* @summary Not found
|
|
55
58
|
* @category Fix
|
|
56
59
|
* @param {string} details the specific details that causes this error
|
|
60
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
57
61
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
58
62
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
59
63
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -66,6 +70,7 @@ class PullRequestTemplateNotFoundError extends problem_error_1.ProblemError {
|
|
|
66
70
|
status: 404,
|
|
67
71
|
errorCode: 'SNYK-PR-TEMPLATE-0002',
|
|
68
72
|
level: 'error',
|
|
73
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
69
74
|
instance,
|
|
70
75
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
71
76
|
this.name = this.constructor.name;
|
|
@@ -82,6 +87,7 @@ exports.PullRequestTemplateNotFoundError = PullRequestTemplateNotFoundError;
|
|
|
82
87
|
* @summary Failed to compile pull request template
|
|
83
88
|
* @category Fix
|
|
84
89
|
* @param {string} details the specific details that causes this error
|
|
90
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
85
91
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
86
92
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
87
93
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -94,6 +100,7 @@ class FailedToCompilePrTemplateError extends problem_error_1.ProblemError {
|
|
|
94
100
|
status: 400,
|
|
95
101
|
errorCode: 'SNYK-PR-TEMPLATE-0003',
|
|
96
102
|
level: 'error',
|
|
103
|
+
classification: types_1.Classification.UNEXPECTED,
|
|
97
104
|
instance,
|
|
98
105
|
}, details, Object.assign({ links: [
|
|
99
106
|
'https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta',
|
|
@@ -112,6 +119,7 @@ exports.FailedToCompilePrTemplateError = FailedToCompilePrTemplateError;
|
|
|
112
119
|
* @summary Failed to parse pull request attributes
|
|
113
120
|
* @category Fix
|
|
114
121
|
* @param {string} details the specific details that causes this error
|
|
122
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
115
123
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
116
124
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
117
125
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -124,6 +132,7 @@ class FailedToParsePullRequestAttributesError extends problem_error_1.ProblemErr
|
|
|
124
132
|
status: 500,
|
|
125
133
|
errorCode: 'SNYK-PR-TEMPLATE-0004',
|
|
126
134
|
level: 'error',
|
|
135
|
+
classification: types_1.Classification.UNEXPECTED,
|
|
127
136
|
instance,
|
|
128
137
|
}, details, Object.assign({ links: [
|
|
129
138
|
'https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta',
|
|
@@ -142,6 +151,7 @@ exports.FailedToParsePullRequestAttributesError = FailedToParsePullRequestAttrib
|
|
|
142
151
|
* @summary Failed to load YAML file after substituting Snyk variables
|
|
143
152
|
* @category Fix
|
|
144
153
|
* @param {string} details the specific details that causes this error
|
|
154
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
145
155
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
146
156
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
147
157
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -154,6 +164,7 @@ class FailedToLoadCompiledYamlError extends problem_error_1.ProblemError {
|
|
|
154
164
|
status: 400,
|
|
155
165
|
errorCode: 'SNYK-PR-TEMPLATE-0005',
|
|
156
166
|
level: 'error',
|
|
167
|
+
classification: types_1.Classification.UNEXPECTED,
|
|
157
168
|
instance,
|
|
158
169
|
}, details, Object.assign({ links: [
|
|
159
170
|
'https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta',
|
|
@@ -172,6 +183,7 @@ exports.FailedToLoadCompiledYamlError = FailedToLoadCompiledYamlError;
|
|
|
172
183
|
* @summary Failed to generate hash for custom PR template
|
|
173
184
|
* @category Fix
|
|
174
185
|
* @param {string} details the specific details that causes this error
|
|
186
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
175
187
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
176
188
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
177
189
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -184,6 +196,7 @@ class FailedToGenerateHashError extends problem_error_1.ProblemError {
|
|
|
184
196
|
status: 500,
|
|
185
197
|
errorCode: 'SNYK-PR-TEMPLATE-0006',
|
|
186
198
|
level: 'error',
|
|
199
|
+
classification: types_1.Classification.UNEXPECTED,
|
|
187
200
|
instance,
|
|
188
201
|
}, details, Object.assign({ links: [
|
|
189
202
|
'https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta',
|
|
@@ -202,6 +215,7 @@ exports.FailedToGenerateHashError = FailedToGenerateHashError;
|
|
|
202
215
|
* @summary Unable to create pull request template
|
|
203
216
|
* @category Fix
|
|
204
217
|
* @param {string} details the specific details that causes this error
|
|
218
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
205
219
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
206
220
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
207
221
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -214,6 +228,7 @@ class FailedToCreatePRTemplateError extends problem_error_1.ProblemError {
|
|
|
214
228
|
status: 500,
|
|
215
229
|
errorCode: 'SNYK-PR-TEMPLATE-0007',
|
|
216
230
|
level: 'error',
|
|
231
|
+
classification: types_1.Classification.UNEXPECTED,
|
|
217
232
|
instance,
|
|
218
233
|
}, details, Object.assign({ links: [
|
|
219
234
|
'https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta',
|
|
@@ -232,6 +247,7 @@ exports.FailedToCreatePRTemplateError = FailedToCreatePRTemplateError;
|
|
|
232
247
|
* @summary Unable to get pull request template
|
|
233
248
|
* @category Fix
|
|
234
249
|
* @param {string} details the specific details that causes this error
|
|
250
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
235
251
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
236
252
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
237
253
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -244,6 +260,7 @@ class FailedToReadPRTemplateError extends problem_error_1.ProblemError {
|
|
|
244
260
|
status: 500,
|
|
245
261
|
errorCode: 'SNYK-PR-TEMPLATE-0008',
|
|
246
262
|
level: 'error',
|
|
263
|
+
classification: types_1.Classification.UNEXPECTED,
|
|
247
264
|
instance,
|
|
248
265
|
}, details, Object.assign({ links: [
|
|
249
266
|
'https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta',
|
|
@@ -262,6 +279,7 @@ exports.FailedToReadPRTemplateError = FailedToReadPRTemplateError;
|
|
|
262
279
|
* @summary Unable to delete pull request template
|
|
263
280
|
* @category Fix
|
|
264
281
|
* @param {string} details the specific details that causes this error
|
|
282
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
265
283
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
266
284
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
267
285
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -274,6 +292,7 @@ class FailedToDeletePRTemplateError extends problem_error_1.ProblemError {
|
|
|
274
292
|
status: 500,
|
|
275
293
|
errorCode: 'SNYK-PR-TEMPLATE-0009',
|
|
276
294
|
level: 'error',
|
|
295
|
+
classification: types_1.Classification.UNEXPECTED,
|
|
277
296
|
instance,
|
|
278
297
|
}, details, Object.assign({ links: [
|
|
279
298
|
'https://docs.snyk.io/scan-application-code/snyk-open-source/open-source-basics/customize-pr-templates-closed-beta',
|
|
@@ -289,6 +308,7 @@ exports.FailedToDeletePRTemplateError = FailedToDeletePRTemplateError;
|
|
|
289
308
|
* @summary Invalid payload
|
|
290
309
|
* @category Fix
|
|
291
310
|
* @param {string} details the specific details that causes this error
|
|
311
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
292
312
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
293
313
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
294
314
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -301,6 +321,7 @@ class PRTemplateInvalidPayloadError extends problem_error_1.ProblemError {
|
|
|
301
321
|
status: 400,
|
|
302
322
|
errorCode: 'SNYK-PR-TEMPLATE-0010',
|
|
303
323
|
level: 'error',
|
|
324
|
+
classification: types_1.Classification.UNEXPECTED,
|
|
304
325
|
instance,
|
|
305
326
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
306
327
|
this.name = this.constructor.name;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fix-error-catalog.js","sourceRoot":"","sources":["../../../../../packages/error-catalog-nodejs-public/src/catalogs/Fix-error-catalog.ts"],"names":[],"mappings":";;;AAAA,oDAAgD;AAEhD
|
|
1
|
+
{"version":3,"file":"Fix-error-catalog.js","sourceRoot":"","sources":["../../../../../packages/error-catalog-nodejs-public/src/catalogs/Fix-error-catalog.ts"],"names":[],"mappings":";;;AAAA,oCAA0C;AAC1C,oDAAgD;AAEhD;;;;;;;;;;;;;;GAcG;AACH,MAAa,qCAAsC,SAAQ,4BAAY;IACrE,YACI,OAAe,EACf,cAAoC,EACpC,KAAa,EACb,QAAiB;QAEnB,KAAK,CACH;YACE,KAAK,EAAE,uCAAuC;YAC9C,IAAI,EAAE,oEAAoE;YAC1E,MAAM,EAAE,GAAG;YACX,SAAS,EAAE,uBAAuB;YAClC,KAAK,EAAE,OAAO;YACd,cAAc,EAAE,sBAAc,CAAC,UAAU;YACzC,QAAQ;SACT,EACD,OAAO,kBAEL,KAAK,EAAE;gBACP,mHAAmH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AAiB;QAEnB,KAAK,CACH;YACE,KAAK,EAAE,wCAAwC;YAC/C,IAAI,EAAE,oEAAoE;YAC1E,MAAM,EAAE,GAAG;YACX,SAAS,EAAE,uBAAuB;YAClC,KAAK,EAAE,OAAO;YACd,cAAc,EAAE,sBAAc,CAAC,UAAU;YACzC,QAAQ;SACT,EACD,OAAO,kBAEL,KAAK,EAAE;gBACP,mHAAmH;aAClH,IACE,cAAc,GAEnB,KAAK,CACN,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACpC,CAAC;CACF;AA5BD,sEA4BC;AAED;;;;;;;;;;;GAWG;AACH,MAAa,6BAA8B,SAAQ,4BAAY;IAC7D,YACI,OAAe,EACf,cAAoC,EACpC,KAAa,EACb,QAAiB;QAEnB,KAAK,CACH;YACE,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,oEAAoE;YAC1E,MAAM,EAAE,GAAG;YACX,SAAS,EAAE,uBAAuB;YAClC,KAAK,EAAE,OAAO;YACd,cAAc,EAAE,sBAAc,CAAC,UAAU;YACzC,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;AA1BD,sEA0BC"}
|
|
@@ -24,6 +24,7 @@ import { ProblemError } from '../problem-error';
|
|
|
24
24
|
* @summary Invalid request
|
|
25
25
|
* @category IsolatedBuilds
|
|
26
26
|
* @param {string} details the specific details that causes this error
|
|
27
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
27
28
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
28
29
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
29
30
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -38,6 +39,7 @@ export declare class InvalidRequestError extends ProblemError {
|
|
|
38
39
|
* @summary Build environment not found
|
|
39
40
|
* @category IsolatedBuilds
|
|
40
41
|
* @param {string} details the specific details that causes this error
|
|
42
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
41
43
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
42
44
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
43
45
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -55,6 +57,7 @@ export declare class BuildEnvironmentNotFoundError extends ProblemError {
|
|
|
55
57
|
* @summary Unsupported Ecosystem
|
|
56
58
|
* @category IsolatedBuilds
|
|
57
59
|
* @param {string} details the specific details that causes this error
|
|
60
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
58
61
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
59
62
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
60
63
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"use strict";
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.UnsupportedEcosystemError = exports.BuildEnvironmentNotFoundError = exports.InvalidRequestError = void 0;
|
|
19
|
+
const types_1 = require("../types");
|
|
19
20
|
const problem_error_1 = require("../problem-error");
|
|
20
21
|
/**
|
|
21
22
|
* @class
|
|
@@ -27,6 +28,7 @@ const problem_error_1 = require("../problem-error");
|
|
|
27
28
|
* @summary Invalid request
|
|
28
29
|
* @category IsolatedBuilds
|
|
29
30
|
* @param {string} details the specific details that causes this error
|
|
31
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
30
32
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
31
33
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
32
34
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -39,6 +41,7 @@ class InvalidRequestError extends problem_error_1.ProblemError {
|
|
|
39
41
|
status: 400,
|
|
40
42
|
errorCode: 'SNYK-OS-8001',
|
|
41
43
|
level: 'error',
|
|
44
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
42
45
|
instance,
|
|
43
46
|
}, details, Object.assign({ links: [
|
|
44
47
|
'https://apidocs.snyk.io/',
|
|
@@ -54,6 +57,7 @@ exports.InvalidRequestError = InvalidRequestError;
|
|
|
54
57
|
* @summary Build environment not found
|
|
55
58
|
* @category IsolatedBuilds
|
|
56
59
|
* @param {string} details the specific details that causes this error
|
|
60
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
57
61
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
58
62
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
59
63
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -66,6 +70,7 @@ class BuildEnvironmentNotFoundError extends problem_error_1.ProblemError {
|
|
|
66
70
|
status: 404,
|
|
67
71
|
errorCode: 'SNYK-OS-8002',
|
|
68
72
|
level: 'warn',
|
|
73
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
69
74
|
instance,
|
|
70
75
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
71
76
|
this.name = this.constructor.name;
|
|
@@ -82,6 +87,7 @@ exports.BuildEnvironmentNotFoundError = BuildEnvironmentNotFoundError;
|
|
|
82
87
|
* @summary Unsupported Ecosystem
|
|
83
88
|
* @category IsolatedBuilds
|
|
84
89
|
* @param {string} details the specific details that causes this error
|
|
90
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
85
91
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
86
92
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
87
93
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -94,6 +100,7 @@ class UnsupportedEcosystemError extends problem_error_1.ProblemError {
|
|
|
94
100
|
status: 400,
|
|
95
101
|
errorCode: 'SNYK-OS-8003',
|
|
96
102
|
level: 'error',
|
|
103
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
97
104
|
instance,
|
|
98
105
|
}, details, Object.assign({ links: [
|
|
99
106
|
'https://docs.snyk.io/scan-applications/supported-languages-and-frameworks/supported-languages-frameworks-and-feature-availability-overview#open-source-and-licensing-snyk-open-source',
|
|
@@ -1 +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
|
|
1
|
+
{"version":3,"file":"IsolatedBuilds-error-catalog.js","sourceRoot":"","sources":["../../../../../packages/error-catalog-nodejs-public/src/catalogs/IsolatedBuilds-error-catalog.ts"],"names":[],"mappings":";;;AAAA,oCAA0C;AAC1C,oDAAgD;AAEhD;;;;;;;;;;;;;;GAcG;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,cAAc,EAAE,sBAAc,CAAC,UAAU;YACzC,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;AA5BD,kDA4BC;AAED;;;;;;;;;;;GAWG;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,cAAc,EAAE,sBAAc,CAAC,UAAU;YACzC,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;AA1BD,sEA0BC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAa,yBAA0B,SAAQ,4BAAY;IACzD,YACI,OAAe,EACf,cAAoC,EACpC,KAAa,EACb,QAAiB;QAEnB,KAAK,CACH;YACE,KAAK,EAAE,uBAAuB;YAC9B,IAAI,EAAE,2DAA2D;YACjE,MAAM,EAAE,GAAG;YACX,SAAS,EAAE,cAAc;YACzB,KAAK,EAAE,OAAO;YACd,cAAc,EAAE,sBAAc,CAAC,UAAU;YACzC,QAAQ;SACT,EACD,OAAO,kBAEL,KAAK,EAAE;gBACP,uLAAuL;aACtL,IACE,cAAc,GAEnB,KAAK,CACN,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACpC,CAAC;CACF;AA5BD,8DA4BC"}
|
|
@@ -24,6 +24,7 @@ import { ProblemError } from '../problem-error';
|
|
|
24
24
|
* @summary Bad request
|
|
25
25
|
* @category OpenAPI
|
|
26
26
|
* @param {string} details the specific details that causes this error
|
|
27
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
27
28
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
28
29
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
29
30
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -38,6 +39,7 @@ export declare class BadRequestError extends ProblemError {
|
|
|
38
39
|
* @summary Forbidden
|
|
39
40
|
* @category OpenAPI
|
|
40
41
|
* @param {string} details the specific details that causes this error
|
|
42
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
41
43
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
42
44
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
43
45
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -52,6 +54,7 @@ export declare class ForbiddenError extends ProblemError {
|
|
|
52
54
|
* @summary Not acceptable
|
|
53
55
|
* @category OpenAPI
|
|
54
56
|
* @param {string} details the specific details that causes this error
|
|
57
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
55
58
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
56
59
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
57
60
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -66,6 +69,7 @@ export declare class NotAcceptableError extends ProblemError {
|
|
|
66
69
|
* @summary Not found
|
|
67
70
|
* @category OpenAPI
|
|
68
71
|
* @param {string} details the specific details that causes this error
|
|
72
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
69
73
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
70
74
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
71
75
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -80,6 +84,7 @@ export declare class NotFoundError extends ProblemError {
|
|
|
80
84
|
* @summary Method not allowed
|
|
81
85
|
* @category OpenAPI
|
|
82
86
|
* @param {string} details the specific details that causes this error
|
|
87
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
83
88
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
84
89
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
85
90
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -94,6 +99,7 @@ export declare class MethodNotAllowedError extends ProblemError {
|
|
|
94
99
|
* @summary Request entity too large
|
|
95
100
|
* @category OpenAPI
|
|
96
101
|
* @param {string} details the specific details that causes this error
|
|
102
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
97
103
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
98
104
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
99
105
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -111,6 +117,7 @@ export declare class RequestEntityTooLargeError extends ProblemError {
|
|
|
111
117
|
* @summary Unauthorized
|
|
112
118
|
* @category OpenAPI
|
|
113
119
|
* @param {string} details the specific details that causes this error
|
|
120
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
114
121
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
115
122
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
116
123
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -125,6 +132,7 @@ export declare class UnauthorizedError extends ProblemError {
|
|
|
125
132
|
* @summary Unsupported media type
|
|
126
133
|
* @category OpenAPI
|
|
127
134
|
* @param {string} details the specific details that causes this error
|
|
135
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
128
136
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
129
137
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
130
138
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"use strict";
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.UnsupportedMediaTypeError = exports.UnauthorizedError = exports.RequestEntityTooLargeError = exports.MethodNotAllowedError = exports.NotFoundError = exports.NotAcceptableError = exports.ForbiddenError = exports.BadRequestError = void 0;
|
|
19
|
+
const types_1 = require("../types");
|
|
19
20
|
const problem_error_1 = require("../problem-error");
|
|
20
21
|
/**
|
|
21
22
|
* @class
|
|
@@ -27,6 +28,7 @@ const problem_error_1 = require("../problem-error");
|
|
|
27
28
|
* @summary Bad request
|
|
28
29
|
* @category OpenAPI
|
|
29
30
|
* @param {string} details the specific details that causes this error
|
|
31
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
30
32
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
31
33
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
32
34
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -39,6 +41,7 @@ class BadRequestError extends problem_error_1.ProblemError {
|
|
|
39
41
|
status: 400,
|
|
40
42
|
errorCode: 'SNYK-OPENAPI-0001',
|
|
41
43
|
level: 'warn',
|
|
44
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
42
45
|
instance,
|
|
43
46
|
}, details, Object.assign({ links: [
|
|
44
47
|
'https://docs.snyk.io/snyk-api-info/getting-started-using-snyk-rest-api ',
|
|
@@ -54,6 +57,7 @@ exports.BadRequestError = BadRequestError;
|
|
|
54
57
|
* @summary Forbidden
|
|
55
58
|
* @category OpenAPI
|
|
56
59
|
* @param {string} details the specific details that causes this error
|
|
60
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
57
61
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
58
62
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
59
63
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -66,6 +70,7 @@ class ForbiddenError extends problem_error_1.ProblemError {
|
|
|
66
70
|
status: 403,
|
|
67
71
|
errorCode: 'SNYK-OPENAPI-0002',
|
|
68
72
|
level: 'warn',
|
|
73
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
69
74
|
instance,
|
|
70
75
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
71
76
|
this.name = this.constructor.name;
|
|
@@ -79,6 +84,7 @@ exports.ForbiddenError = ForbiddenError;
|
|
|
79
84
|
* @summary Not acceptable
|
|
80
85
|
* @category OpenAPI
|
|
81
86
|
* @param {string} details the specific details that causes this error
|
|
87
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
82
88
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
83
89
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
84
90
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -91,6 +97,7 @@ class NotAcceptableError extends problem_error_1.ProblemError {
|
|
|
91
97
|
status: 406,
|
|
92
98
|
errorCode: 'SNYK-OPENAPI-0003',
|
|
93
99
|
level: 'warn',
|
|
100
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
94
101
|
instance,
|
|
95
102
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
96
103
|
this.name = this.constructor.name;
|
|
@@ -104,6 +111,7 @@ exports.NotAcceptableError = NotAcceptableError;
|
|
|
104
111
|
* @summary Not found
|
|
105
112
|
* @category OpenAPI
|
|
106
113
|
* @param {string} details the specific details that causes this error
|
|
114
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
107
115
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
108
116
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
109
117
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -116,6 +124,7 @@ class NotFoundError extends problem_error_1.ProblemError {
|
|
|
116
124
|
status: 404,
|
|
117
125
|
errorCode: 'SNYK-OPENAPI-0004',
|
|
118
126
|
level: 'warn',
|
|
127
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
119
128
|
instance,
|
|
120
129
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
121
130
|
this.name = this.constructor.name;
|
|
@@ -129,6 +138,7 @@ exports.NotFoundError = NotFoundError;
|
|
|
129
138
|
* @summary Method not allowed
|
|
130
139
|
* @category OpenAPI
|
|
131
140
|
* @param {string} details the specific details that causes this error
|
|
141
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
132
142
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
133
143
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
134
144
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -141,6 +151,7 @@ class MethodNotAllowedError extends problem_error_1.ProblemError {
|
|
|
141
151
|
status: 405,
|
|
142
152
|
errorCode: 'SNYK-OPENAPI-0005',
|
|
143
153
|
level: 'warn',
|
|
154
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
144
155
|
instance,
|
|
145
156
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
146
157
|
this.name = this.constructor.name;
|
|
@@ -154,6 +165,7 @@ exports.MethodNotAllowedError = MethodNotAllowedError;
|
|
|
154
165
|
* @summary Request entity too large
|
|
155
166
|
* @category OpenAPI
|
|
156
167
|
* @param {string} details the specific details that causes this error
|
|
168
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
157
169
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
158
170
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
159
171
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -166,6 +178,7 @@ class RequestEntityTooLargeError extends problem_error_1.ProblemError {
|
|
|
166
178
|
status: 413,
|
|
167
179
|
errorCode: 'SNYK-OPENAPI-0006',
|
|
168
180
|
level: 'warn',
|
|
181
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
169
182
|
instance,
|
|
170
183
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
171
184
|
this.name = this.constructor.name;
|
|
@@ -182,6 +195,7 @@ exports.RequestEntityTooLargeError = RequestEntityTooLargeError;
|
|
|
182
195
|
* @summary Unauthorized
|
|
183
196
|
* @category OpenAPI
|
|
184
197
|
* @param {string} details the specific details that causes this error
|
|
198
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
185
199
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
186
200
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
187
201
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -194,6 +208,7 @@ class UnauthorizedError extends problem_error_1.ProblemError {
|
|
|
194
208
|
status: 401,
|
|
195
209
|
errorCode: 'SNYK-OPENAPI-0007',
|
|
196
210
|
level: 'warn',
|
|
211
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
197
212
|
instance,
|
|
198
213
|
}, details, Object.assign({ links: [
|
|
199
214
|
'https://docs.snyk.io/snyk-api-info/authentication-for-api',
|
|
@@ -209,6 +224,7 @@ exports.UnauthorizedError = UnauthorizedError;
|
|
|
209
224
|
* @summary Unsupported media type
|
|
210
225
|
* @category OpenAPI
|
|
211
226
|
* @param {string} details the specific details that causes this error
|
|
227
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
212
228
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
213
229
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
214
230
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -221,6 +237,7 @@ class UnsupportedMediaTypeError extends problem_error_1.ProblemError {
|
|
|
221
237
|
status: 415,
|
|
222
238
|
errorCode: 'SNYK-OPENAPI-0008',
|
|
223
239
|
level: 'warn',
|
|
240
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
224
241
|
instance,
|
|
225
242
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
226
243
|
this.name = this.constructor.name;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAPI-error-catalog.js","sourceRoot":"","sources":["../../../../../packages/error-catalog-nodejs-public/src/catalogs/OpenAPI-error-catalog.ts"],"names":[],"mappings":";;;AAAA,oDAAgD;AAEhD
|
|
1
|
+
{"version":3,"file":"OpenAPI-error-catalog.js","sourceRoot":"","sources":["../../../../../packages/error-catalog-nodejs-public/src/catalogs/OpenAPI-error-catalog.ts"],"names":[],"mappings":";;;AAAA,oCAA0C;AAC1C,oDAAgD;AAEhD;;;;;;;;;;;;;;GAcG;AACH,MAAa,eAAgB,SAAQ,4BAAY;IAC/C,YACI,OAAe,EACf,cAAoC,EACpC,KAAa,EACb,QAAiB;QAEnB,KAAK,CACH;YACE,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,gEAAgE;YACtE,MAAM,EAAE,GAAG;YACX,SAAS,EAAE,mBAAmB;YAC9B,KAAK,EAAE,MAAM;YACb,cAAc,EAAE,sBAAc,CAAC,UAAU;YACzC,QAAQ;SACT,EACD,OAAO,kBAEL,KAAK,EAAE;gBACP,yEAAyE;aACxE,IACE,cAAc,GAEnB,KAAK,CACN,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACpC,CAAC;CACF;AA5BD,0CA4BC;AAED;;;;;;;;;;;GAWG;AACH,MAAa,cAAe,SAAQ,4BAAY;IAC9C,YACI,OAAe,EACf,cAAoC,EACpC,KAAa,EACb,QAAiB;QAEnB,KAAK,CACH;YACE,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,gEAAgE;YACtE,MAAM,EAAE,GAAG;YACX,SAAS,EAAE,mBAAmB;YAC9B,KAAK,EAAE,MAAM;YACb,cAAc,EAAE,sBAAc,CAAC,UAAU;YACzC,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;AA1BD,wCA0BC;AAED;;;;;;;;;;;GAWG;AACH,MAAa,kBAAmB,SAAQ,4BAAY;IAClD,YACI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