@snyk/error-catalog-nodejs-public 5.0.0 → 5.0.1
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 +20 -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 +6 -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 +16 -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 +104 -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 +10 -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 +10 -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 +4 -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 +40 -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 +18 -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 +12 -0
- package/src/catalogs/Snyk-error-catalog.js.map +1 -1
- package/src/problem-error.js +1 -1
- package/src/problem-error.js.map +1 -1
- package/src/types.d.ts +3 -1
- package/src/types.js.map +1 -1
|
@@ -24,6 +24,7 @@ const problem_error_1 = require("../problem-error");
|
|
|
24
24
|
* @summary Service temporarily throttled
|
|
25
25
|
* @category Snyk
|
|
26
26
|
* @param {string} details the specific details that causes this error
|
|
27
|
+
* @param {string} 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
|
|
@@ -36,6 +37,7 @@ class TooManyRequestsError extends problem_error_1.ProblemError {
|
|
|
36
37
|
status: 429,
|
|
37
38
|
errorCode: 'SNYK-0001',
|
|
38
39
|
level: 'warn',
|
|
40
|
+
classification: 'ACTIONABLE',
|
|
39
41
|
instance,
|
|
40
42
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
41
43
|
this.name = this.constructor.name;
|
|
@@ -52,6 +54,7 @@ exports.TooManyRequestsError = TooManyRequestsError;
|
|
|
52
54
|
* @summary Server error response
|
|
53
55
|
* @category Snyk
|
|
54
56
|
* @param {string} details the specific details that causes this error
|
|
57
|
+
* @param {string} 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
|
|
@@ -64,6 +67,7 @@ class NotImplementedError extends problem_error_1.ProblemError {
|
|
|
64
67
|
status: 501,
|
|
65
68
|
errorCode: 'SNYK-0002',
|
|
66
69
|
level: 'error',
|
|
70
|
+
classification: 'UNSUPPORTED',
|
|
67
71
|
instance,
|
|
68
72
|
}, details, Object.assign({ links: [
|
|
69
73
|
'https://docs.snyk.io/snyk-api-info',
|
|
@@ -79,6 +83,7 @@ exports.NotImplementedError = NotImplementedError;
|
|
|
79
83
|
* @summary Client request cannot be processed
|
|
80
84
|
* @category Snyk
|
|
81
85
|
* @param {string} details the specific details that causes this error
|
|
86
|
+
* @param {string} classification the error classification determining if the error is user-actionable or not
|
|
82
87
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
83
88
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
84
89
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -91,6 +96,7 @@ class BadRequestError extends problem_error_1.ProblemError {
|
|
|
91
96
|
status: 400,
|
|
92
97
|
errorCode: 'SNYK-0003',
|
|
93
98
|
level: 'error',
|
|
99
|
+
classification: 'ACTIONABLE',
|
|
94
100
|
instance,
|
|
95
101
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
96
102
|
this.name = this.constructor.name;
|
|
@@ -107,6 +113,7 @@ exports.BadRequestError = BadRequestError;
|
|
|
107
113
|
* @summary Server communication error
|
|
108
114
|
* @category Snyk
|
|
109
115
|
* @param {string} details the specific details that causes this error
|
|
116
|
+
* @param {string} classification the error classification determining if the error is user-actionable or not
|
|
110
117
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
111
118
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
112
119
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -119,6 +126,7 @@ class TimeoutError extends problem_error_1.ProblemError {
|
|
|
119
126
|
status: 504,
|
|
120
127
|
errorCode: 'SNYK-0004',
|
|
121
128
|
level: 'error',
|
|
129
|
+
classification: 'UNEXPECTED',
|
|
122
130
|
instance,
|
|
123
131
|
}, details, Object.assign({ links: [
|
|
124
132
|
'https://status.snyk.io/',
|
|
@@ -134,6 +142,7 @@ exports.TimeoutError = TimeoutError;
|
|
|
134
142
|
* @summary Authentication error
|
|
135
143
|
* @category Snyk
|
|
136
144
|
* @param {string} details the specific details that causes this error
|
|
145
|
+
* @param {string} classification the error classification determining if the error is user-actionable or not
|
|
137
146
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
138
147
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
139
148
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -146,6 +155,7 @@ class UnauthorisedError extends problem_error_1.ProblemError {
|
|
|
146
155
|
status: 401,
|
|
147
156
|
errorCode: 'SNYK-0005',
|
|
148
157
|
level: 'error',
|
|
158
|
+
classification: 'ACTIONABLE',
|
|
149
159
|
instance,
|
|
150
160
|
}, details, Object.assign({ links: [] }, additionalData), cause);
|
|
151
161
|
this.name = this.constructor.name;
|
|
@@ -162,6 +172,7 @@ exports.UnauthorisedError = UnauthorisedError;
|
|
|
162
172
|
* @summary Request not fulfilled due to server error
|
|
163
173
|
* @category Snyk
|
|
164
174
|
* @param {string} details the specific details that causes this error
|
|
175
|
+
* @param {string} classification the error classification determining if the error is user-actionable or not
|
|
165
176
|
* @param {Record<string, any>} [additionalData] a collection of relevant data specific to this error
|
|
166
177
|
* @param {Error} [cause] the `Error` type that caused this error to be thrown
|
|
167
178
|
* @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata
|
|
@@ -174,6 +185,7 @@ class ServerError extends problem_error_1.ProblemError {
|
|
|
174
185
|
status: 500,
|
|
175
186
|
errorCode: 'SNYK-9999',
|
|
176
187
|
level: 'error',
|
|
188
|
+
classification: 'UNEXPECTED',
|
|
177
189
|
instance,
|
|
178
190
|
}, details, Object.assign({ links: [
|
|
179
191
|
'https://status.snyk.io/',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Snyk-error-catalog.js","sourceRoot":"","sources":["../../../../../packages/error-catalog-nodejs-public/src/catalogs/Snyk-error-catalog.ts"],"names":[],"mappings":";;;AAAA,oDAAgD;AAEhD
|
|
1
|
+
{"version":3,"file":"Snyk-error-catalog.js","sourceRoot":"","sources":["../../../../../packages/error-catalog-nodejs-public/src/catalogs/Snyk-error-catalog.ts"],"names":[],"mappings":";;;AAAA,oDAAgD;AAEhD;;;;;;;;;;;GAWG;AACH,MAAa,oBAAqB,SAAQ,4BAAY;IACpD,YACI,OAAe,EACf,cAAoC,EACpC,KAAa,EACb,QAAiB;QAEnB,KAAK,CACH;YACE,KAAK,EAAE,+BAA+B;YACtC,IAAI,EAAE,wDAAwD;YAC9D,MAAM,EAAE,GAAG;YACX,SAAS,EAAE,WAAW;YACtB,KAAK,EAAE,MAAM;YACb,cAAc,EAAE,YAAY;YAC5B,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,oDA0BC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAa,mBAAoB,SAAQ,4BAAY;IACnD,YACI,OAAe,EACf,cAAoC,EACpC,KAAa,EACb,QAAiB;QAEnB,KAAK,CACH;YACE,KAAK,EAAE,uBAAuB;YAC9B,IAAI,EAAE,wDAAwD;YAC9D,MAAM,EAAE,GAAG;YACX,SAAS,EAAE,WAAW;YACtB,KAAK,EAAE,OAAO;YACd,cAAc,EAAE,aAAa;YAC7B,QAAQ;SACT,EACD,OAAO,kBAEL,KAAK,EAAE;gBACP,oCAAoC;aACnC,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,eAAgB,SAAQ,4BAAY;IAC/C,YACI,OAAe,EACf,cAA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AAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACpC,CAAC;CACF;AA1BD,8CA0BC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAa,WAAY,SAAQ,4BAAY;IAC3C,YACI,OAAe,EACf,cAAoC,EACpC,KAAa,EACb,QAAiB;QAEnB,KAAK,CACH;YACE,KAAK,EAAE,4CAA4C;YACnD,IAAI,EAAE,wDAAwD;YAC9D,MAAM,EAAE,GAAG;YACX,SAAS,EAAE,WAAW;YACtB,KAAK,EAAE,OAAO;YACd,cAAc,EAAE,YAAY;YAC5B,QAAQ;SACT,EACD,OAAO,kBAEL,KAAK,EAAE;gBACP,yBAAyB;aACxB,IACE,cAAc,GAEnB,KAAK,CACN,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACpC,CAAC;CACF;AA5BD,kCA4BC"}
|
package/src/problem-error.js
CHANGED
|
@@ -47,7 +47,7 @@ class ProblemError extends Error {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
toProblemJson(instance) {
|
|
50
|
-
const payload = Object.assign({ type: this.metadata.type, title: this.metadata.title, status: this.metadata.status, errorCode: this.metadata.errorCode, detail: this.detail, instance }, this.additionalData);
|
|
50
|
+
const payload = Object.assign({ type: this.metadata.type, title: this.metadata.title, status: this.metadata.status, errorCode: this.metadata.errorCode, detail: this.detail, classification: this.metadata.classification, instance }, this.additionalData);
|
|
51
51
|
return new types_1.ProblemJson(payload);
|
|
52
52
|
}
|
|
53
53
|
/**
|
package/src/problem-error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"problem-error.js","sourceRoot":"","sources":["../../../../packages/error-catalog-nodejs-public/src/problem-error.ts"],"names":[],"mappings":";;;AAAA,mCAQiB;AACjB,+BAA0B;AAC1B,iCAAiD;AAEjD,MAAa,YAAa,SAAQ,KAAK;IAOrC,YACkB,QAAuB,EACvB,MAAc,E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C;QAE3C,2DAA2D;QAC3D,MAAM,WAAW,GAAG,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAEvD,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACnC,MAAM,GAAG,IAAA,8BAAuB,EAAC,WAAW,CAAC,CAAC;SAC/C;QAED,MAAM,kBAAkB,GAAuB;YAC7C,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE;gBACL,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI;aAC1B;YACD,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;YACpC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS;YAC7B,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK;YAC1B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,oBACC,IAAI,CAAC,cAAc,CACvB;SACF,CAAC;QACF,IAAI,MAAM,EAAE;YACV,kBAAkB,CAAC,MAAM,GAAG,MAAM,CAAC;SACpC;QACD,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED,SAAS,CAAC,QAAiB;QACzB,MAAM,OAAO,GAAkB;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,KAAK;aACf;YACD,MAAM,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;SAC9C,CAAC;QAEF,OAAO,IAAI,eAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"problem-error.js","sourceRoot":"","sources":["../../../../packages/error-catalog-nodejs-public/src/problem-error.ts"],"names":[],"mappings":";;;AAAA,mCAQiB;AACjB,+BAA0B;AAC1B,iCAAiD;AAEjD,MAAa,YAAa,SAAQ,KAAK;IAOrC,YACkB,QAAuB,EACvB,MAAc,EACd,cAAoC,EACpC,KAAa;QAE7B,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC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D;QAC3D,MAAM,WAAW,GAAG,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAEvD,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACnC,MAAM,GAAG,IAAA,8BAAuB,EAAC,WAAW,CAAC,CAAC;SAC/C;QAED,MAAM,kBAAkB,GAAuB;YAC7C,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE;gBACL,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI;aAC1B;YACD,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;YACpC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS;YAC7B,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK;YAC1B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,oBACC,IAAI,CAAC,cAAc,CACvB;SACF,CAAC;QACF,IAAI,MAAM,EAAE;YACV,kBAAkB,CAAC,MAAM,GAAG,MAAM,CAAC;SACpC;QACD,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED,SAAS,CAAC,QAAiB;QACzB,MAAM,OAAO,GAAkB;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,KAAK;aACf;YACD,MAAM,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;SAC9C,CAAC;QAEF,OAAO,IAAI,eAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;CACF;AA3FD,oCA2FC"}
|
package/src/types.d.ts
CHANGED
|
@@ -28,10 +28,12 @@ export type Problem = {
|
|
|
28
28
|
instance?: string;
|
|
29
29
|
/** The level of this error */
|
|
30
30
|
level?: string;
|
|
31
|
+
/** Determining whether this error is a failure of Snyk to handle an operation that it was expected to, or if it derives from a requesting service producing something that cannot be handled. */
|
|
32
|
+
classification: string;
|
|
31
33
|
/** Additional properties. */
|
|
32
34
|
[x: string]: any;
|
|
33
35
|
};
|
|
34
|
-
export type ErrorMetadata = Pick<Problem, 'type' | 'title' | 'status' | 'errorCode' | 'level' | 'instance'>;
|
|
36
|
+
export type ErrorMetadata = Pick<Problem, 'type' | 'title' | 'status' | 'errorCode' | 'level' | 'instance' | 'classification'>;
|
|
35
37
|
export declare enum ErrorFormats {
|
|
36
38
|
JsonApi = 0,
|
|
37
39
|
ProblemJson = 1
|
package/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../packages/error-catalog-nodejs-public/src/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../packages/error-catalog-nodejs-public/src/types.ts"],"names":[],"mappings":";;;AAgCA,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,qDAAO,CAAA;IACP,6DAAW,CAAA;AACb,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAQD,MAAa,WAAW;IACtB,YAA6B,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;IAAG,CAAC;IAEjD,OAAO;QACL,OAAO;YACL,cAAc,EAAE,2BAA2B;SAC5C,CAAC;IACJ,CAAC;IAED,IAAI;QACF,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AAZD,kCAYC;AA6BD,MAAa,OAAO;IAClB,YAA6B,OAAsB;QAAtB,YAAO,GAAP,OAAO,CAAe;IAAG,CAAC;IAEvD,OAAO;QACL,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI;QACF,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AAVD,0BAUC"}
|