@dxos/errors 0.8.4-main.406dc2a → 0.8.4-main.548089c
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/dist/lib/browser/index.mjs +16 -80
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +16 -80
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/base.d.ts +6 -11
- package/dist/types/src/base.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +48 -96
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/base.ts +7 -14
|
@@ -1,51 +1,43 @@
|
|
|
1
1
|
import { BaseError } from './base';
|
|
2
2
|
declare const ApiError_base: {
|
|
3
3
|
new (options?: import("./base").BaseErrorOptions): {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
code: "API";
|
|
5
|
+
context: Record<string, unknown>;
|
|
6
6
|
get name(): "API";
|
|
7
7
|
get message(): string;
|
|
8
|
-
get code(): "API";
|
|
9
8
|
get _tag(): "API";
|
|
10
|
-
get context(): Record<string, unknown>;
|
|
11
9
|
stack?: string;
|
|
12
10
|
cause?: unknown;
|
|
13
11
|
};
|
|
14
12
|
code: "API";
|
|
15
13
|
is(error: unknown): error is BaseError;
|
|
16
14
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
code: "API";
|
|
16
|
+
context: Record<string, unknown>;
|
|
19
17
|
get name(): "API";
|
|
20
18
|
get message(): string;
|
|
21
|
-
get code(): "API";
|
|
22
19
|
get _tag(): "API";
|
|
23
|
-
get context(): Record<string, unknown>;
|
|
24
20
|
stack?: string;
|
|
25
21
|
cause?: unknown;
|
|
26
22
|
};
|
|
27
23
|
extend<Code extends string = string>(code: Code, message?: string): {
|
|
28
24
|
new (options?: import("./base").BaseErrorOptions): {
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
code: Code;
|
|
26
|
+
context: Record<string, unknown>;
|
|
31
27
|
get name(): Code;
|
|
32
28
|
get message(): string;
|
|
33
|
-
get code(): Code;
|
|
34
29
|
get _tag(): Code;
|
|
35
|
-
get context(): Record<string, unknown>;
|
|
36
30
|
stack?: string;
|
|
37
31
|
cause?: unknown;
|
|
38
32
|
};
|
|
39
33
|
code: Code;
|
|
40
34
|
is(error: unknown): error is BaseError;
|
|
41
35
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
code: Code;
|
|
37
|
+
context: Record<string, unknown>;
|
|
44
38
|
get name(): Code;
|
|
45
39
|
get message(): string;
|
|
46
|
-
get code(): Code;
|
|
47
40
|
get _tag(): Code;
|
|
48
|
-
get context(): Record<string, unknown>;
|
|
49
41
|
stack?: string;
|
|
50
42
|
cause?: unknown;
|
|
51
43
|
};
|
|
@@ -64,51 +56,43 @@ export declare class ApiError extends ApiError_base {
|
|
|
64
56
|
}
|
|
65
57
|
declare const SystemError_base: {
|
|
66
58
|
new (options?: import("./base").BaseErrorOptions): {
|
|
67
|
-
|
|
68
|
-
|
|
59
|
+
code: "SYSTEM";
|
|
60
|
+
context: Record<string, unknown>;
|
|
69
61
|
get name(): "SYSTEM";
|
|
70
62
|
get message(): string;
|
|
71
|
-
get code(): "SYSTEM";
|
|
72
63
|
get _tag(): "SYSTEM";
|
|
73
|
-
get context(): Record<string, unknown>;
|
|
74
64
|
stack?: string;
|
|
75
65
|
cause?: unknown;
|
|
76
66
|
};
|
|
77
67
|
code: "SYSTEM";
|
|
78
68
|
is(error: unknown): error is BaseError;
|
|
79
69
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
80
|
-
|
|
81
|
-
|
|
70
|
+
code: "SYSTEM";
|
|
71
|
+
context: Record<string, unknown>;
|
|
82
72
|
get name(): "SYSTEM";
|
|
83
73
|
get message(): string;
|
|
84
|
-
get code(): "SYSTEM";
|
|
85
74
|
get _tag(): "SYSTEM";
|
|
86
|
-
get context(): Record<string, unknown>;
|
|
87
75
|
stack?: string;
|
|
88
76
|
cause?: unknown;
|
|
89
77
|
};
|
|
90
78
|
extend<Code extends string = string>(code: Code, message?: string): {
|
|
91
79
|
new (options?: import("./base").BaseErrorOptions): {
|
|
92
|
-
|
|
93
|
-
|
|
80
|
+
code: Code;
|
|
81
|
+
context: Record<string, unknown>;
|
|
94
82
|
get name(): Code;
|
|
95
83
|
get message(): string;
|
|
96
|
-
get code(): Code;
|
|
97
84
|
get _tag(): Code;
|
|
98
|
-
get context(): Record<string, unknown>;
|
|
99
85
|
stack?: string;
|
|
100
86
|
cause?: unknown;
|
|
101
87
|
};
|
|
102
88
|
code: Code;
|
|
103
89
|
is(error: unknown): error is BaseError;
|
|
104
90
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
105
|
-
|
|
106
|
-
|
|
91
|
+
code: Code;
|
|
92
|
+
context: Record<string, unknown>;
|
|
107
93
|
get name(): Code;
|
|
108
94
|
get message(): string;
|
|
109
|
-
get code(): Code;
|
|
110
95
|
get _tag(): Code;
|
|
111
|
-
get context(): Record<string, unknown>;
|
|
112
96
|
stack?: string;
|
|
113
97
|
cause?: unknown;
|
|
114
98
|
};
|
|
@@ -127,51 +111,43 @@ export declare class SystemError extends SystemError_base {
|
|
|
127
111
|
}
|
|
128
112
|
declare const InternalError_base: {
|
|
129
113
|
new (options?: import("./base").BaseErrorOptions): {
|
|
130
|
-
|
|
131
|
-
|
|
114
|
+
code: "INTERNAL";
|
|
115
|
+
context: Record<string, unknown>;
|
|
132
116
|
get name(): "INTERNAL";
|
|
133
117
|
get message(): string;
|
|
134
|
-
get code(): "INTERNAL";
|
|
135
118
|
get _tag(): "INTERNAL";
|
|
136
|
-
get context(): Record<string, unknown>;
|
|
137
119
|
stack?: string;
|
|
138
120
|
cause?: unknown;
|
|
139
121
|
};
|
|
140
122
|
code: "INTERNAL";
|
|
141
123
|
is(error: unknown): error is BaseError;
|
|
142
124
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
143
|
-
|
|
144
|
-
|
|
125
|
+
code: "INTERNAL";
|
|
126
|
+
context: Record<string, unknown>;
|
|
145
127
|
get name(): "INTERNAL";
|
|
146
128
|
get message(): string;
|
|
147
|
-
get code(): "INTERNAL";
|
|
148
129
|
get _tag(): "INTERNAL";
|
|
149
|
-
get context(): Record<string, unknown>;
|
|
150
130
|
stack?: string;
|
|
151
131
|
cause?: unknown;
|
|
152
132
|
};
|
|
153
133
|
extend<Code extends string = string>(code: Code, message?: string): {
|
|
154
134
|
new (options?: import("./base").BaseErrorOptions): {
|
|
155
|
-
|
|
156
|
-
|
|
135
|
+
code: Code;
|
|
136
|
+
context: Record<string, unknown>;
|
|
157
137
|
get name(): Code;
|
|
158
138
|
get message(): string;
|
|
159
|
-
get code(): Code;
|
|
160
139
|
get _tag(): Code;
|
|
161
|
-
get context(): Record<string, unknown>;
|
|
162
140
|
stack?: string;
|
|
163
141
|
cause?: unknown;
|
|
164
142
|
};
|
|
165
143
|
code: Code;
|
|
166
144
|
is(error: unknown): error is BaseError;
|
|
167
145
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
168
|
-
|
|
169
|
-
|
|
146
|
+
code: Code;
|
|
147
|
+
context: Record<string, unknown>;
|
|
170
148
|
get name(): Code;
|
|
171
149
|
get message(): string;
|
|
172
|
-
get code(): Code;
|
|
173
150
|
get _tag(): Code;
|
|
174
|
-
get context(): Record<string, unknown>;
|
|
175
151
|
stack?: string;
|
|
176
152
|
cause?: unknown;
|
|
177
153
|
};
|
|
@@ -190,51 +166,43 @@ export declare class InternalError extends InternalError_base {
|
|
|
190
166
|
}
|
|
191
167
|
declare const TimeoutError_base: {
|
|
192
168
|
new (options?: import("./base").BaseErrorOptions): {
|
|
193
|
-
|
|
194
|
-
|
|
169
|
+
code: "TIMEOUT";
|
|
170
|
+
context: Record<string, unknown>;
|
|
195
171
|
get name(): "TIMEOUT";
|
|
196
172
|
get message(): string;
|
|
197
|
-
get code(): "TIMEOUT";
|
|
198
173
|
get _tag(): "TIMEOUT";
|
|
199
|
-
get context(): Record<string, unknown>;
|
|
200
174
|
stack?: string;
|
|
201
175
|
cause?: unknown;
|
|
202
176
|
};
|
|
203
177
|
code: "TIMEOUT";
|
|
204
178
|
is(error: unknown): error is BaseError;
|
|
205
179
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
206
|
-
|
|
207
|
-
|
|
180
|
+
code: "TIMEOUT";
|
|
181
|
+
context: Record<string, unknown>;
|
|
208
182
|
get name(): "TIMEOUT";
|
|
209
183
|
get message(): string;
|
|
210
|
-
get code(): "TIMEOUT";
|
|
211
184
|
get _tag(): "TIMEOUT";
|
|
212
|
-
get context(): Record<string, unknown>;
|
|
213
185
|
stack?: string;
|
|
214
186
|
cause?: unknown;
|
|
215
187
|
};
|
|
216
188
|
extend<Code extends string = string>(code: Code, message?: string): {
|
|
217
189
|
new (options?: import("./base").BaseErrorOptions): {
|
|
218
|
-
|
|
219
|
-
|
|
190
|
+
code: Code;
|
|
191
|
+
context: Record<string, unknown>;
|
|
220
192
|
get name(): Code;
|
|
221
193
|
get message(): string;
|
|
222
|
-
get code(): Code;
|
|
223
194
|
get _tag(): Code;
|
|
224
|
-
get context(): Record<string, unknown>;
|
|
225
195
|
stack?: string;
|
|
226
196
|
cause?: unknown;
|
|
227
197
|
};
|
|
228
198
|
code: Code;
|
|
229
199
|
is(error: unknown): error is BaseError;
|
|
230
200
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
231
|
-
|
|
232
|
-
|
|
201
|
+
code: Code;
|
|
202
|
+
context: Record<string, unknown>;
|
|
233
203
|
get name(): Code;
|
|
234
204
|
get message(): string;
|
|
235
|
-
get code(): Code;
|
|
236
205
|
get _tag(): Code;
|
|
237
|
-
get context(): Record<string, unknown>;
|
|
238
206
|
stack?: string;
|
|
239
207
|
cause?: unknown;
|
|
240
208
|
};
|
|
@@ -253,51 +221,43 @@ export declare class TimeoutError extends TimeoutError_base {
|
|
|
253
221
|
}
|
|
254
222
|
declare const AbortedError_base: {
|
|
255
223
|
new (options?: import("./base").BaseErrorOptions): {
|
|
256
|
-
|
|
257
|
-
|
|
224
|
+
code: "ABORTED";
|
|
225
|
+
context: Record<string, unknown>;
|
|
258
226
|
get name(): "ABORTED";
|
|
259
227
|
get message(): string;
|
|
260
|
-
get code(): "ABORTED";
|
|
261
228
|
get _tag(): "ABORTED";
|
|
262
|
-
get context(): Record<string, unknown>;
|
|
263
229
|
stack?: string;
|
|
264
230
|
cause?: unknown;
|
|
265
231
|
};
|
|
266
232
|
code: "ABORTED";
|
|
267
233
|
is(error: unknown): error is BaseError;
|
|
268
234
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
269
|
-
|
|
270
|
-
|
|
235
|
+
code: "ABORTED";
|
|
236
|
+
context: Record<string, unknown>;
|
|
271
237
|
get name(): "ABORTED";
|
|
272
238
|
get message(): string;
|
|
273
|
-
get code(): "ABORTED";
|
|
274
239
|
get _tag(): "ABORTED";
|
|
275
|
-
get context(): Record<string, unknown>;
|
|
276
240
|
stack?: string;
|
|
277
241
|
cause?: unknown;
|
|
278
242
|
};
|
|
279
243
|
extend<Code extends string = string>(code: Code, message?: string): {
|
|
280
244
|
new (options?: import("./base").BaseErrorOptions): {
|
|
281
|
-
|
|
282
|
-
|
|
245
|
+
code: Code;
|
|
246
|
+
context: Record<string, unknown>;
|
|
283
247
|
get name(): Code;
|
|
284
248
|
get message(): string;
|
|
285
|
-
get code(): Code;
|
|
286
249
|
get _tag(): Code;
|
|
287
|
-
get context(): Record<string, unknown>;
|
|
288
250
|
stack?: string;
|
|
289
251
|
cause?: unknown;
|
|
290
252
|
};
|
|
291
253
|
code: Code;
|
|
292
254
|
is(error: unknown): error is BaseError;
|
|
293
255
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
294
|
-
|
|
295
|
-
|
|
256
|
+
code: Code;
|
|
257
|
+
context: Record<string, unknown>;
|
|
296
258
|
get name(): Code;
|
|
297
259
|
get message(): string;
|
|
298
|
-
get code(): Code;
|
|
299
260
|
get _tag(): Code;
|
|
300
|
-
get context(): Record<string, unknown>;
|
|
301
261
|
stack?: string;
|
|
302
262
|
cause?: unknown;
|
|
303
263
|
};
|
|
@@ -316,51 +276,43 @@ export declare class AbortedError extends AbortedError_base {
|
|
|
316
276
|
}
|
|
317
277
|
declare const NotImplementedError_base: {
|
|
318
278
|
new (options?: import("./base").BaseErrorOptions): {
|
|
319
|
-
|
|
320
|
-
|
|
279
|
+
code: "NOT_IMPLEMENTED";
|
|
280
|
+
context: Record<string, unknown>;
|
|
321
281
|
get name(): "NOT_IMPLEMENTED";
|
|
322
282
|
get message(): string;
|
|
323
|
-
get code(): "NOT_IMPLEMENTED";
|
|
324
283
|
get _tag(): "NOT_IMPLEMENTED";
|
|
325
|
-
get context(): Record<string, unknown>;
|
|
326
284
|
stack?: string;
|
|
327
285
|
cause?: unknown;
|
|
328
286
|
};
|
|
329
287
|
code: "NOT_IMPLEMENTED";
|
|
330
288
|
is(error: unknown): error is BaseError;
|
|
331
289
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
332
|
-
|
|
333
|
-
|
|
290
|
+
code: "NOT_IMPLEMENTED";
|
|
291
|
+
context: Record<string, unknown>;
|
|
334
292
|
get name(): "NOT_IMPLEMENTED";
|
|
335
293
|
get message(): string;
|
|
336
|
-
get code(): "NOT_IMPLEMENTED";
|
|
337
294
|
get _tag(): "NOT_IMPLEMENTED";
|
|
338
|
-
get context(): Record<string, unknown>;
|
|
339
295
|
stack?: string;
|
|
340
296
|
cause?: unknown;
|
|
341
297
|
};
|
|
342
298
|
extend<Code extends string = string>(code: Code, message?: string): {
|
|
343
299
|
new (options?: import("./base").BaseErrorOptions): {
|
|
344
|
-
|
|
345
|
-
|
|
300
|
+
code: Code;
|
|
301
|
+
context: Record<string, unknown>;
|
|
346
302
|
get name(): Code;
|
|
347
303
|
get message(): string;
|
|
348
|
-
get code(): Code;
|
|
349
304
|
get _tag(): Code;
|
|
350
|
-
get context(): Record<string, unknown>;
|
|
351
305
|
stack?: string;
|
|
352
306
|
cause?: unknown;
|
|
353
307
|
};
|
|
354
308
|
code: Code;
|
|
355
309
|
is(error: unknown): error is BaseError;
|
|
356
310
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
357
|
-
|
|
358
|
-
|
|
311
|
+
code: Code;
|
|
312
|
+
context: Record<string, unknown>;
|
|
359
313
|
get name(): Code;
|
|
360
314
|
get message(): string;
|
|
361
|
-
get code(): Code;
|
|
362
315
|
get _tag(): Code;
|
|
363
|
-
get context(): Record<string, unknown>;
|
|
364
316
|
stack?: string;
|
|
365
317
|
cause?: unknown;
|
|
366
318
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;;;;;;;;;;;;;uEAakZ,cAAc;;;;;;;;;;;;;;;;;;;;;2EAAd,cAAc;;;;;;;;;;;;;;;;;;;;AAXnc,qBAAa,QAAS,SAAQ,aAAoC;CAAG;;;;;;;;;;;;;uEAWgX,cAAc;;;;;;;;;;;;;;;;;;;;;2EAAd,cAAc;;;;;;;;;;;;;;;;;;;;AATnc,qBAAa,WAAY,SAAQ,gBAA0C;CAAG;;;;;;;;;;;;;uEASuW,cAAc;;;;;;;;;;;;;;;;;;;;;2EAAd,cAAc;;;;;;;;;;;;;;;;;;;;AAPnc,qBAAa,aAAc,SAAQ,kBAA8C;CAAG;;;;;;;;;;;;;uEAOiW,cAAc;;;;;;;;;;;;;;;;;;;;;2EAAd,cAAc;;;;;;;;;;;;;;;;;;;;AALnc,qBAAa,YAAa,SAAQ,iBAAsC;CAAG;;;;;;;;;;;;;uEAK0W,cAAc;;;;;;;;;;;;;;;;;;;;;2EAAd,cAAc;;;;;;;;;;;;;;;;;;;;AAHnc,qBAAa,YAAa,SAAQ,iBAAsC;CAAG;;;;;;;;;;;;;uEAG0W,cAAc;;;;;;;;;;;;;;;;;;;;;2EAAd,cAAc;;;;;;;;;;;;;;;;;;;;AADnc,qBAAa,mBAAoB,SAAQ,wBAAsD;CAAG"}
|