@dxos/errors 0.8.4-main.548089c → 0.8.4-main.59c2e9b

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.
@@ -1,47 +1,47 @@
1
1
  import { BaseError } from './base';
2
2
  declare const ApiError_base: {
3
3
  new (options?: import("./base").BaseErrorOptions): {
4
- code: "API";
4
+ name: "ApiError";
5
5
  context: Record<string, unknown>;
6
- get name(): "API";
7
6
  get message(): string;
8
- get _tag(): "API";
7
+ get _tag(): "ApiError";
9
8
  stack?: string;
10
9
  cause?: unknown;
11
10
  };
12
- code: "API";
11
+ name: "ApiError";
13
12
  is(error: unknown): error is BaseError;
14
- wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
15
- code: "API";
13
+ wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
14
+ ifTypeDiffers?: boolean;
15
+ }) | undefined): (error: unknown) => {
16
+ name: "ApiError";
16
17
  context: Record<string, unknown>;
17
- get name(): "API";
18
18
  get message(): string;
19
- get _tag(): "API";
19
+ get _tag(): "ApiError";
20
20
  stack?: string;
21
21
  cause?: unknown;
22
22
  };
23
- extend<Code extends string = string>(code: Code, message?: string): {
23
+ extend<Name extends string = string>(name: Name, message?: string): {
24
24
  new (options?: import("./base").BaseErrorOptions): {
25
- code: Code;
25
+ name: Name;
26
26
  context: Record<string, unknown>;
27
- get name(): Code;
28
27
  get message(): string;
29
- get _tag(): Code;
28
+ get _tag(): Name;
30
29
  stack?: string;
31
30
  cause?: unknown;
32
31
  };
33
- code: Code;
32
+ name: Name;
34
33
  is(error: unknown): error is BaseError;
35
- wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
36
- code: Code;
34
+ wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
35
+ ifTypeDiffers?: boolean;
36
+ }): (error: unknown) => {
37
+ name: Name;
37
38
  context: Record<string, unknown>;
38
- get name(): Code;
39
39
  get message(): string;
40
- get _tag(): Code;
40
+ get _tag(): Name;
41
41
  stack?: string;
42
42
  cause?: unknown;
43
43
  };
44
- extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
44
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
45
45
  isError(error: unknown): error is Error;
46
46
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
47
47
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
@@ -56,47 +56,47 @@ export declare class ApiError extends ApiError_base {
56
56
  }
57
57
  declare const SystemError_base: {
58
58
  new (options?: import("./base").BaseErrorOptions): {
59
- code: "SYSTEM";
59
+ name: "SystemError";
60
60
  context: Record<string, unknown>;
61
- get name(): "SYSTEM";
62
61
  get message(): string;
63
- get _tag(): "SYSTEM";
62
+ get _tag(): "SystemError";
64
63
  stack?: string;
65
64
  cause?: unknown;
66
65
  };
67
- code: "SYSTEM";
66
+ name: "SystemError";
68
67
  is(error: unknown): error is BaseError;
69
- wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
70
- code: "SYSTEM";
68
+ wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
69
+ ifTypeDiffers?: boolean;
70
+ }) | undefined): (error: unknown) => {
71
+ name: "SystemError";
71
72
  context: Record<string, unknown>;
72
- get name(): "SYSTEM";
73
73
  get message(): string;
74
- get _tag(): "SYSTEM";
74
+ get _tag(): "SystemError";
75
75
  stack?: string;
76
76
  cause?: unknown;
77
77
  };
78
- extend<Code extends string = string>(code: Code, message?: string): {
78
+ extend<Name extends string = string>(name: Name, message?: string): {
79
79
  new (options?: import("./base").BaseErrorOptions): {
80
- code: Code;
80
+ name: Name;
81
81
  context: Record<string, unknown>;
82
- get name(): Code;
83
82
  get message(): string;
84
- get _tag(): Code;
83
+ get _tag(): Name;
85
84
  stack?: string;
86
85
  cause?: unknown;
87
86
  };
88
- code: Code;
87
+ name: Name;
89
88
  is(error: unknown): error is BaseError;
90
- wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
91
- code: Code;
89
+ wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
90
+ ifTypeDiffers?: boolean;
91
+ }): (error: unknown) => {
92
+ name: Name;
92
93
  context: Record<string, unknown>;
93
- get name(): Code;
94
94
  get message(): string;
95
- get _tag(): Code;
95
+ get _tag(): Name;
96
96
  stack?: string;
97
97
  cause?: unknown;
98
98
  };
99
- extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
99
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
100
100
  isError(error: unknown): error is Error;
101
101
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
102
102
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
@@ -111,47 +111,47 @@ export declare class SystemError extends SystemError_base {
111
111
  }
112
112
  declare const InternalError_base: {
113
113
  new (options?: import("./base").BaseErrorOptions): {
114
- code: "INTERNAL";
114
+ name: "InternalError";
115
115
  context: Record<string, unknown>;
116
- get name(): "INTERNAL";
117
116
  get message(): string;
118
- get _tag(): "INTERNAL";
117
+ get _tag(): "InternalError";
119
118
  stack?: string;
120
119
  cause?: unknown;
121
120
  };
122
- code: "INTERNAL";
121
+ name: "InternalError";
123
122
  is(error: unknown): error is BaseError;
124
- wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
125
- code: "INTERNAL";
123
+ wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
124
+ ifTypeDiffers?: boolean;
125
+ }) | undefined): (error: unknown) => {
126
+ name: "InternalError";
126
127
  context: Record<string, unknown>;
127
- get name(): "INTERNAL";
128
128
  get message(): string;
129
- get _tag(): "INTERNAL";
129
+ get _tag(): "InternalError";
130
130
  stack?: string;
131
131
  cause?: unknown;
132
132
  };
133
- extend<Code extends string = string>(code: Code, message?: string): {
133
+ extend<Name extends string = string>(name: Name, message?: string): {
134
134
  new (options?: import("./base").BaseErrorOptions): {
135
- code: Code;
135
+ name: Name;
136
136
  context: Record<string, unknown>;
137
- get name(): Code;
138
137
  get message(): string;
139
- get _tag(): Code;
138
+ get _tag(): Name;
140
139
  stack?: string;
141
140
  cause?: unknown;
142
141
  };
143
- code: Code;
142
+ name: Name;
144
143
  is(error: unknown): error is BaseError;
145
- wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
146
- code: Code;
144
+ wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
145
+ ifTypeDiffers?: boolean;
146
+ }): (error: unknown) => {
147
+ name: Name;
147
148
  context: Record<string, unknown>;
148
- get name(): Code;
149
149
  get message(): string;
150
- get _tag(): Code;
150
+ get _tag(): Name;
151
151
  stack?: string;
152
152
  cause?: unknown;
153
153
  };
154
- extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
154
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
155
155
  isError(error: unknown): error is Error;
156
156
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
157
157
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
@@ -166,47 +166,47 @@ export declare class InternalError extends InternalError_base {
166
166
  }
167
167
  declare const TimeoutError_base: {
168
168
  new (options?: import("./base").BaseErrorOptions): {
169
- code: "TIMEOUT";
169
+ name: "TimeoutError";
170
170
  context: Record<string, unknown>;
171
- get name(): "TIMEOUT";
172
171
  get message(): string;
173
- get _tag(): "TIMEOUT";
172
+ get _tag(): "TimeoutError";
174
173
  stack?: string;
175
174
  cause?: unknown;
176
175
  };
177
- code: "TIMEOUT";
176
+ name: "TimeoutError";
178
177
  is(error: unknown): error is BaseError;
179
- wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
180
- code: "TIMEOUT";
178
+ wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
179
+ ifTypeDiffers?: boolean;
180
+ }) | undefined): (error: unknown) => {
181
+ name: "TimeoutError";
181
182
  context: Record<string, unknown>;
182
- get name(): "TIMEOUT";
183
183
  get message(): string;
184
- get _tag(): "TIMEOUT";
184
+ get _tag(): "TimeoutError";
185
185
  stack?: string;
186
186
  cause?: unknown;
187
187
  };
188
- extend<Code extends string = string>(code: Code, message?: string): {
188
+ extend<Name extends string = string>(name: Name, message?: string): {
189
189
  new (options?: import("./base").BaseErrorOptions): {
190
- code: Code;
190
+ name: Name;
191
191
  context: Record<string, unknown>;
192
- get name(): Code;
193
192
  get message(): string;
194
- get _tag(): Code;
193
+ get _tag(): Name;
195
194
  stack?: string;
196
195
  cause?: unknown;
197
196
  };
198
- code: Code;
197
+ name: Name;
199
198
  is(error: unknown): error is BaseError;
200
- wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
201
- code: Code;
199
+ wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
200
+ ifTypeDiffers?: boolean;
201
+ }): (error: unknown) => {
202
+ name: Name;
202
203
  context: Record<string, unknown>;
203
- get name(): Code;
204
204
  get message(): string;
205
- get _tag(): Code;
205
+ get _tag(): Name;
206
206
  stack?: string;
207
207
  cause?: unknown;
208
208
  };
209
- extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
209
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
210
210
  isError(error: unknown): error is Error;
211
211
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
212
212
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
@@ -221,47 +221,47 @@ export declare class TimeoutError extends TimeoutError_base {
221
221
  }
222
222
  declare const AbortedError_base: {
223
223
  new (options?: import("./base").BaseErrorOptions): {
224
- code: "ABORTED";
224
+ name: "AbortedError";
225
225
  context: Record<string, unknown>;
226
- get name(): "ABORTED";
227
226
  get message(): string;
228
- get _tag(): "ABORTED";
227
+ get _tag(): "AbortedError";
229
228
  stack?: string;
230
229
  cause?: unknown;
231
230
  };
232
- code: "ABORTED";
231
+ name: "AbortedError";
233
232
  is(error: unknown): error is BaseError;
234
- wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
235
- code: "ABORTED";
233
+ wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
234
+ ifTypeDiffers?: boolean;
235
+ }) | undefined): (error: unknown) => {
236
+ name: "AbortedError";
236
237
  context: Record<string, unknown>;
237
- get name(): "ABORTED";
238
238
  get message(): string;
239
- get _tag(): "ABORTED";
239
+ get _tag(): "AbortedError";
240
240
  stack?: string;
241
241
  cause?: unknown;
242
242
  };
243
- extend<Code extends string = string>(code: Code, message?: string): {
243
+ extend<Name extends string = string>(name: Name, message?: string): {
244
244
  new (options?: import("./base").BaseErrorOptions): {
245
- code: Code;
245
+ name: Name;
246
246
  context: Record<string, unknown>;
247
- get name(): Code;
248
247
  get message(): string;
249
- get _tag(): Code;
248
+ get _tag(): Name;
250
249
  stack?: string;
251
250
  cause?: unknown;
252
251
  };
253
- code: Code;
252
+ name: Name;
254
253
  is(error: unknown): error is BaseError;
255
- wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
256
- code: Code;
254
+ wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
255
+ ifTypeDiffers?: boolean;
256
+ }): (error: unknown) => {
257
+ name: Name;
257
258
  context: Record<string, unknown>;
258
- get name(): Code;
259
259
  get message(): string;
260
- get _tag(): Code;
260
+ get _tag(): Name;
261
261
  stack?: string;
262
262
  cause?: unknown;
263
263
  };
264
- extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
264
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
265
265
  isError(error: unknown): error is Error;
266
266
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
267
267
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
@@ -276,47 +276,47 @@ export declare class AbortedError extends AbortedError_base {
276
276
  }
277
277
  declare const NotImplementedError_base: {
278
278
  new (options?: import("./base").BaseErrorOptions): {
279
- code: "NOT_IMPLEMENTED";
279
+ name: "NotImplementedError";
280
280
  context: Record<string, unknown>;
281
- get name(): "NOT_IMPLEMENTED";
282
281
  get message(): string;
283
- get _tag(): "NOT_IMPLEMENTED";
282
+ get _tag(): "NotImplementedError";
284
283
  stack?: string;
285
284
  cause?: unknown;
286
285
  };
287
- code: "NOT_IMPLEMENTED";
286
+ name: "NotImplementedError";
288
287
  is(error: unknown): error is BaseError;
289
- wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
290
- code: "NOT_IMPLEMENTED";
288
+ wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
289
+ ifTypeDiffers?: boolean;
290
+ }) | undefined): (error: unknown) => {
291
+ name: "NotImplementedError";
291
292
  context: Record<string, unknown>;
292
- get name(): "NOT_IMPLEMENTED";
293
293
  get message(): string;
294
- get _tag(): "NOT_IMPLEMENTED";
294
+ get _tag(): "NotImplementedError";
295
295
  stack?: string;
296
296
  cause?: unknown;
297
297
  };
298
- extend<Code extends string = string>(code: Code, message?: string): {
298
+ extend<Name extends string = string>(name: Name, message?: string): {
299
299
  new (options?: import("./base").BaseErrorOptions): {
300
- code: Code;
300
+ name: Name;
301
301
  context: Record<string, unknown>;
302
- get name(): Code;
303
302
  get message(): string;
304
- get _tag(): Code;
303
+ get _tag(): Name;
305
304
  stack?: string;
306
305
  cause?: unknown;
307
306
  };
308
- code: Code;
307
+ name: Name;
309
308
  is(error: unknown): error is BaseError;
310
- wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
311
- code: Code;
309
+ wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
310
+ ifTypeDiffers?: boolean;
311
+ }): (error: unknown) => {
312
+ name: Name;
312
313
  context: Record<string, unknown>;
313
- get name(): Code;
314
314
  get message(): string;
315
- get _tag(): Code;
315
+ get _tag(): Name;
316
316
  stack?: string;
317
317
  cause?: unknown;
318
318
  };
319
- extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
319
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
320
320
  isError(error: unknown): error is Error;
321
321
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
322
322
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
@@ -329,5 +329,60 @@ declare const NotImplementedError_base: {
329
329
  };
330
330
  export declare class NotImplementedError extends NotImplementedError_base {
331
331
  }
332
+ declare const RuntimeServiceError_base: {
333
+ new (options?: import("./base").BaseErrorOptions): {
334
+ name: "RuntimeServiceError";
335
+ context: Record<string, unknown>;
336
+ get message(): string;
337
+ get _tag(): "RuntimeServiceError";
338
+ stack?: string;
339
+ cause?: unknown;
340
+ };
341
+ name: "RuntimeServiceError";
342
+ is(error: unknown): error is BaseError;
343
+ wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
344
+ ifTypeDiffers?: boolean;
345
+ }) | undefined): (error: unknown) => {
346
+ name: "RuntimeServiceError";
347
+ context: Record<string, unknown>;
348
+ get message(): string;
349
+ get _tag(): "RuntimeServiceError";
350
+ stack?: string;
351
+ cause?: unknown;
352
+ };
353
+ extend<Name extends string = string>(name: Name, message?: string): {
354
+ new (options?: import("./base").BaseErrorOptions): {
355
+ name: Name;
356
+ context: Record<string, unknown>;
357
+ get message(): string;
358
+ get _tag(): Name;
359
+ stack?: string;
360
+ cause?: unknown;
361
+ };
362
+ name: Name;
363
+ is(error: unknown): error is BaseError;
364
+ wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
365
+ ifTypeDiffers?: boolean;
366
+ }): (error: unknown) => {
367
+ name: Name;
368
+ context: Record<string, unknown>;
369
+ get message(): string;
370
+ get _tag(): Name;
371
+ stack?: string;
372
+ cause?: unknown;
373
+ };
374
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
375
+ isError(error: unknown): error is Error;
376
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
377
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
378
+ stackTraceLimit: number;
379
+ };
380
+ isError(error: unknown): error is Error;
381
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
382
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
383
+ stackTraceLimit: number;
384
+ };
385
+ export declare class RuntimeServiceError extends RuntimeServiceError_base {
386
+ }
332
387
  export {};
333
388
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAe2S,CAAC;;;;;;;;;;;;;;;;;;;;AAb/U,qBAAa,QAAS,SAAQ,aAAyC;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAaoQ,CAAC;;;;;;;;;;;;;;;;;;;;AAX/U,qBAAa,WAAY,SAAQ,gBAA+C;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAW2P,CAAC;;;;;;;;;;;;;;;;;;;;AAT/U,qBAAa,aAAc,SAAQ,kBAAmD;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBASqP,CAAC;;;;;;;;;;;;;;;;;;;;AAP/U,qBAAa,YAAa,SAAQ,iBAA2C;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAO8P,CAAC;;;;;;;;;;;;;;;;;;;;AAL/U,qBAAa,YAAa,SAAQ,iBAA2C;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAK8P,CAAC;;;;;;;;;;;;;;;;;;;;AAH/U,qBAAa,mBAAoB,SAAQ,wBAA0D;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAGwO,CAAC;;;;;;;;;;;;;;;;;;;;AAD/U,qBAAa,mBAAoB,SAAQ,wBAAgE;CAAG"}