@snyk/error-catalog-nodejs-public 5.0.1 → 5.1.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/package.json +1 -1
- package/src/catalogs/Fix-error-catalog.d.ts +10 -10
- package/src/catalogs/Fix-error-catalog.js +21 -20
- package/src/catalogs/Fix-error-catalog.js.map +1 -1
- package/src/catalogs/IsolatedBuilds-error-catalog.d.ts +3 -3
- package/src/catalogs/IsolatedBuilds-error-catalog.js +7 -6
- package/src/catalogs/IsolatedBuilds-error-catalog.js.map +1 -1
- package/src/catalogs/OpenAPI-error-catalog.d.ts +8 -8
- package/src/catalogs/OpenAPI-error-catalog.js +17 -16
- package/src/catalogs/OpenAPI-error-catalog.js.map +1 -1
- package/src/catalogs/OpenSourceEcosystems-error-catalog.d.ts +67 -52
- package/src/catalogs/OpenSourceEcosystems-error-catalog.js +133 -105
- package/src/catalogs/OpenSourceEcosystems-error-catalog.js.map +1 -1
- package/src/catalogs/OpenSourceProjectIssues-error-catalog.d.ts +5 -5
- package/src/catalogs/OpenSourceProjectIssues-error-catalog.js +11 -10
- package/src/catalogs/OpenSourceProjectIssues-error-catalog.js.map +1 -1
- package/src/catalogs/OpenSourceProjectSnapshots-error-catalog.d.ts +5 -5
- package/src/catalogs/OpenSourceProjectSnapshots-error-catalog.js +11 -10
- package/src/catalogs/OpenSourceProjectSnapshots-error-catalog.js.map +1 -1
- package/src/catalogs/OpenSourceUnmanaged-error-catalog.d.ts +2 -2
- package/src/catalogs/OpenSourceUnmanaged-error-catalog.js +5 -4
- package/src/catalogs/OpenSourceUnmanaged-error-catalog.js.map +1 -1
- package/src/catalogs/PurlVulnerabilityFetching-error-catalog.d.ts +20 -20
- package/src/catalogs/PurlVulnerabilityFetching-error-catalog.js +41 -40
- package/src/catalogs/PurlVulnerabilityFetching-error-catalog.js.map +1 -1
- package/src/catalogs/SbomExport-error-catalog.d.ts +9 -9
- package/src/catalogs/SbomExport-error-catalog.js +19 -18
- package/src/catalogs/SbomExport-error-catalog.js.map +1 -1
- package/src/catalogs/Snyk-error-catalog.d.ts +6 -6
- package/src/catalogs/Snyk-error-catalog.js +13 -12
- package/src/catalogs/Snyk-error-catalog.js.map +1 -1
- package/src/catalogs/error-codes.d.ts +1 -0
- package/src/catalogs/error-codes.js +1 -0
- package/src/catalogs/error-codes.js.map +1 -1
- package/src/problem-error.js +1 -0
- package/src/problem-error.js.map +1 -1
- package/src/types.d.ts +7 -1
- package/src/types.js +7 -1
- package/src/types.js.map +1 -1
|
@@ -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,7 +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
|
|
30
|
-
* @param {
|
|
31
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
31
32
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
32
33
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
33
34
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -40,7 +41,7 @@ class BadRequestError extends problem_error_1.ProblemError {
|
|
|
40
41
|
status: 400,
|
|
41
42
|
errorCode: 'SNYK-OPENAPI-0001',
|
|
42
43
|
level: 'warn',
|
|
43
|
-
classification:
|
|
44
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
44
45
|
instance,
|
|
45
46
|
}, details, Object.assign({ links: [
|
|
46
47
|
'https://docs.snyk.io/snyk-api-info/getting-started-using-snyk-rest-api ',
|
|
@@ -56,7 +57,7 @@ exports.BadRequestError = BadRequestError;
|
|
|
56
57
|
* @summary Forbidden
|
|
57
58
|
* @category OpenAPI
|
|
58
59
|
* @param {string} details the specific details that causes this error
|
|
59
|
-
* @param {
|
|
60
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
60
61
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
61
62
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
62
63
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -69,7 +70,7 @@ class ForbiddenError extends problem_error_1.ProblemError {
|
|
|
69
70
|
status: 403,
|
|
70
71
|
errorCode: 'SNYK-OPENAPI-0002',
|
|
71
72
|
level: 'warn',
|
|
72
|
-
classification:
|
|
73
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
73
74
|
instance,
|
|
74
75
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
75
76
|
this.name = this.constructor.name;
|
|
@@ -83,7 +84,7 @@ exports.ForbiddenError = ForbiddenError;
|
|
|
83
84
|
* @summary Not acceptable
|
|
84
85
|
* @category OpenAPI
|
|
85
86
|
* @param {string} details the specific details that causes this error
|
|
86
|
-
* @param {
|
|
87
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
87
88
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
88
89
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
89
90
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -96,7 +97,7 @@ class NotAcceptableError extends problem_error_1.ProblemError {
|
|
|
96
97
|
status: 406,
|
|
97
98
|
errorCode: 'SNYK-OPENAPI-0003',
|
|
98
99
|
level: 'warn',
|
|
99
|
-
classification:
|
|
100
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
100
101
|
instance,
|
|
101
102
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
102
103
|
this.name = this.constructor.name;
|
|
@@ -110,7 +111,7 @@ exports.NotAcceptableError = NotAcceptableError;
|
|
|
110
111
|
* @summary Not found
|
|
111
112
|
* @category OpenAPI
|
|
112
113
|
* @param {string} details the specific details that causes this error
|
|
113
|
-
* @param {
|
|
114
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
114
115
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
115
116
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
116
117
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -123,7 +124,7 @@ class NotFoundError extends problem_error_1.ProblemError {
|
|
|
123
124
|
status: 404,
|
|
124
125
|
errorCode: 'SNYK-OPENAPI-0004',
|
|
125
126
|
level: 'warn',
|
|
126
|
-
classification:
|
|
127
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
127
128
|
instance,
|
|
128
129
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
129
130
|
this.name = this.constructor.name;
|
|
@@ -137,7 +138,7 @@ exports.NotFoundError = NotFoundError;
|
|
|
137
138
|
* @summary Method not allowed
|
|
138
139
|
* @category OpenAPI
|
|
139
140
|
* @param {string} details the specific details that causes this error
|
|
140
|
-
* @param {
|
|
141
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
141
142
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
142
143
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
143
144
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -150,7 +151,7 @@ class MethodNotAllowedError extends problem_error_1.ProblemError {
|
|
|
150
151
|
status: 405,
|
|
151
152
|
errorCode: 'SNYK-OPENAPI-0005',
|
|
152
153
|
level: 'warn',
|
|
153
|
-
classification:
|
|
154
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
154
155
|
instance,
|
|
155
156
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
156
157
|
this.name = this.constructor.name;
|
|
@@ -164,7 +165,7 @@ exports.MethodNotAllowedError = MethodNotAllowedError;
|
|
|
164
165
|
* @summary Request entity too large
|
|
165
166
|
* @category OpenAPI
|
|
166
167
|
* @param {string} details the specific details that causes this error
|
|
167
|
-
* @param {
|
|
168
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
168
169
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
169
170
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
170
171
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -177,7 +178,7 @@ class RequestEntityTooLargeError extends problem_error_1.ProblemError {
|
|
|
177
178
|
status: 413,
|
|
178
179
|
errorCode: 'SNYK-OPENAPI-0006',
|
|
179
180
|
level: 'warn',
|
|
180
|
-
classification:
|
|
181
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
181
182
|
instance,
|
|
182
183
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
183
184
|
this.name = this.constructor.name;
|
|
@@ -194,7 +195,7 @@ exports.RequestEntityTooLargeError = RequestEntityTooLargeError;
|
|
|
194
195
|
* @summary Unauthorized
|
|
195
196
|
* @category OpenAPI
|
|
196
197
|
* @param {string} details the specific details that causes this error
|
|
197
|
-
* @param {
|
|
198
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
198
199
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
199
200
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
200
201
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -207,7 +208,7 @@ class UnauthorizedError extends problem_error_1.ProblemError {
|
|
|
207
208
|
status: 401,
|
|
208
209
|
errorCode: 'SNYK-OPENAPI-0007',
|
|
209
210
|
level: 'warn',
|
|
210
|
-
classification:
|
|
211
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
211
212
|
instance,
|
|
212
213
|
}, details, Object.assign({ links: [
|
|
213
214
|
'https://docs.snyk.io/snyk-api-info/authentication-for-api',
|
|
@@ -223,7 +224,7 @@ exports.UnauthorizedError = UnauthorizedError;
|
|
|
223
224
|
* @summary Unsupported media type
|
|
224
225
|
* @category OpenAPI
|
|
225
226
|
* @param {string} details the specific details that causes this error
|
|
226
|
-
* @param {
|
|
227
|
+
* @param {Classification} classification the error classification determining if the error is user-actionable or not
|
|
227
228
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
228
229
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
229
230
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -236,7 +237,7 @@ class UnsupportedMediaTypeError extends problem_error_1.ProblemError {
|
|
|
236
237
|
status: 415,
|
|
237
238
|
errorCode: 'SNYK-OPENAPI-0008',
|
|
238
239
|
level: 'warn',
|
|
239
|
-
classification:
|
|
240
|
+
classification: types_1.Classification.ACTIONABLE,
|
|
240
241
|
instance,
|
|
241
242
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
242
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;;;;;;;;;;;;;;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,
|
|
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,OAAe,EACf,cAAoC,EACpC,KAAa,EACb,QAAiB;QAEnB,KAAK,CACH;YACE,KAAK,EAAE,gBAAgB;YACv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