@dxos/errors 0.8.4-main.66e292d → 0.8.4-main.69d29f4

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,51 +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
13
  wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
15
14
  ifTypeDiffers?: boolean;
16
15
  }) | undefined): (error: unknown) => {
17
- code: "API";
16
+ name: "ApiError";
18
17
  context: Record<string, unknown>;
19
- get name(): "API";
20
18
  get message(): string;
21
- get _tag(): "API";
19
+ get _tag(): "ApiError";
22
20
  stack?: string;
23
21
  cause?: unknown;
24
22
  };
25
- extend<Code extends string = string>(code: Code, message?: string): {
23
+ extend<Name extends string = string>(name: Name, message?: string): {
26
24
  new (options?: import("./base").BaseErrorOptions): {
27
- code: Code;
25
+ name: Name;
28
26
  context: Record<string, unknown>;
29
- get name(): Code;
30
27
  get message(): string;
31
- get _tag(): Code;
28
+ get _tag(): Name;
32
29
  stack?: string;
33
30
  cause?: unknown;
34
31
  };
35
- code: Code;
32
+ name: Name;
36
33
  is(error: unknown): error is BaseError;
37
34
  wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
38
35
  ifTypeDiffers?: boolean;
39
36
  }): (error: unknown) => {
40
- code: Code;
37
+ name: Name;
41
38
  context: Record<string, unknown>;
42
- get name(): Code;
43
39
  get message(): string;
44
- get _tag(): Code;
40
+ get _tag(): Name;
45
41
  stack?: string;
46
42
  cause?: unknown;
47
43
  };
48
- extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
44
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
49
45
  isError(error: unknown): error is Error;
50
46
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
51
47
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
@@ -60,51 +56,47 @@ export declare class ApiError extends ApiError_base {
60
56
  }
61
57
  declare const SystemError_base: {
62
58
  new (options?: import("./base").BaseErrorOptions): {
63
- code: "SYSTEM";
59
+ name: "SystemError";
64
60
  context: Record<string, unknown>;
65
- get name(): "SYSTEM";
66
61
  get message(): string;
67
- get _tag(): "SYSTEM";
62
+ get _tag(): "SystemError";
68
63
  stack?: string;
69
64
  cause?: unknown;
70
65
  };
71
- code: "SYSTEM";
66
+ name: "SystemError";
72
67
  is(error: unknown): error is BaseError;
73
68
  wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
74
69
  ifTypeDiffers?: boolean;
75
70
  }) | undefined): (error: unknown) => {
76
- code: "SYSTEM";
71
+ name: "SystemError";
77
72
  context: Record<string, unknown>;
78
- get name(): "SYSTEM";
79
73
  get message(): string;
80
- get _tag(): "SYSTEM";
74
+ get _tag(): "SystemError";
81
75
  stack?: string;
82
76
  cause?: unknown;
83
77
  };
84
- extend<Code extends string = string>(code: Code, message?: string): {
78
+ extend<Name extends string = string>(name: Name, message?: string): {
85
79
  new (options?: import("./base").BaseErrorOptions): {
86
- code: Code;
80
+ name: Name;
87
81
  context: Record<string, unknown>;
88
- get name(): Code;
89
82
  get message(): string;
90
- get _tag(): Code;
83
+ get _tag(): Name;
91
84
  stack?: string;
92
85
  cause?: unknown;
93
86
  };
94
- code: Code;
87
+ name: Name;
95
88
  is(error: unknown): error is BaseError;
96
89
  wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
97
90
  ifTypeDiffers?: boolean;
98
91
  }): (error: unknown) => {
99
- code: Code;
92
+ name: Name;
100
93
  context: Record<string, unknown>;
101
- get name(): Code;
102
94
  get message(): string;
103
- get _tag(): Code;
95
+ get _tag(): Name;
104
96
  stack?: string;
105
97
  cause?: unknown;
106
98
  };
107
- extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
99
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
108
100
  isError(error: unknown): error is Error;
109
101
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
110
102
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
@@ -119,51 +111,47 @@ export declare class SystemError extends SystemError_base {
119
111
  }
120
112
  declare const InternalError_base: {
121
113
  new (options?: import("./base").BaseErrorOptions): {
122
- code: "INTERNAL";
114
+ name: "InternalError";
123
115
  context: Record<string, unknown>;
124
- get name(): "INTERNAL";
125
116
  get message(): string;
126
- get _tag(): "INTERNAL";
117
+ get _tag(): "InternalError";
127
118
  stack?: string;
128
119
  cause?: unknown;
129
120
  };
130
- code: "INTERNAL";
121
+ name: "InternalError";
131
122
  is(error: unknown): error is BaseError;
132
123
  wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
133
124
  ifTypeDiffers?: boolean;
134
125
  }) | undefined): (error: unknown) => {
135
- code: "INTERNAL";
126
+ name: "InternalError";
136
127
  context: Record<string, unknown>;
137
- get name(): "INTERNAL";
138
128
  get message(): string;
139
- get _tag(): "INTERNAL";
129
+ get _tag(): "InternalError";
140
130
  stack?: string;
141
131
  cause?: unknown;
142
132
  };
143
- extend<Code extends string = string>(code: Code, message?: string): {
133
+ extend<Name extends string = string>(name: Name, message?: string): {
144
134
  new (options?: import("./base").BaseErrorOptions): {
145
- code: Code;
135
+ name: Name;
146
136
  context: Record<string, unknown>;
147
- get name(): Code;
148
137
  get message(): string;
149
- get _tag(): Code;
138
+ get _tag(): Name;
150
139
  stack?: string;
151
140
  cause?: unknown;
152
141
  };
153
- code: Code;
142
+ name: Name;
154
143
  is(error: unknown): error is BaseError;
155
144
  wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
156
145
  ifTypeDiffers?: boolean;
157
146
  }): (error: unknown) => {
158
- code: Code;
147
+ name: Name;
159
148
  context: Record<string, unknown>;
160
- get name(): Code;
161
149
  get message(): string;
162
- get _tag(): Code;
150
+ get _tag(): Name;
163
151
  stack?: string;
164
152
  cause?: unknown;
165
153
  };
166
- extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
154
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
167
155
  isError(error: unknown): error is Error;
168
156
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
169
157
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
@@ -178,51 +166,47 @@ export declare class InternalError extends InternalError_base {
178
166
  }
179
167
  declare const TimeoutError_base: {
180
168
  new (options?: import("./base").BaseErrorOptions): {
181
- code: "TIMEOUT";
169
+ name: "TimeoutError";
182
170
  context: Record<string, unknown>;
183
- get name(): "TIMEOUT";
184
171
  get message(): string;
185
- get _tag(): "TIMEOUT";
172
+ get _tag(): "TimeoutError";
186
173
  stack?: string;
187
174
  cause?: unknown;
188
175
  };
189
- code: "TIMEOUT";
176
+ name: "TimeoutError";
190
177
  is(error: unknown): error is BaseError;
191
178
  wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
192
179
  ifTypeDiffers?: boolean;
193
180
  }) | undefined): (error: unknown) => {
194
- code: "TIMEOUT";
181
+ name: "TimeoutError";
195
182
  context: Record<string, unknown>;
196
- get name(): "TIMEOUT";
197
183
  get message(): string;
198
- get _tag(): "TIMEOUT";
184
+ get _tag(): "TimeoutError";
199
185
  stack?: string;
200
186
  cause?: unknown;
201
187
  };
202
- extend<Code extends string = string>(code: Code, message?: string): {
188
+ extend<Name extends string = string>(name: Name, message?: string): {
203
189
  new (options?: import("./base").BaseErrorOptions): {
204
- code: Code;
190
+ name: Name;
205
191
  context: Record<string, unknown>;
206
- get name(): Code;
207
192
  get message(): string;
208
- get _tag(): Code;
193
+ get _tag(): Name;
209
194
  stack?: string;
210
195
  cause?: unknown;
211
196
  };
212
- code: Code;
197
+ name: Name;
213
198
  is(error: unknown): error is BaseError;
214
199
  wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
215
200
  ifTypeDiffers?: boolean;
216
201
  }): (error: unknown) => {
217
- code: Code;
202
+ name: Name;
218
203
  context: Record<string, unknown>;
219
- get name(): Code;
220
204
  get message(): string;
221
- get _tag(): Code;
205
+ get _tag(): Name;
222
206
  stack?: string;
223
207
  cause?: unknown;
224
208
  };
225
- extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
209
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
226
210
  isError(error: unknown): error is Error;
227
211
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
228
212
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
@@ -237,51 +221,47 @@ export declare class TimeoutError extends TimeoutError_base {
237
221
  }
238
222
  declare const AbortedError_base: {
239
223
  new (options?: import("./base").BaseErrorOptions): {
240
- code: "ABORTED";
224
+ name: "AbortedError";
241
225
  context: Record<string, unknown>;
242
- get name(): "ABORTED";
243
226
  get message(): string;
244
- get _tag(): "ABORTED";
227
+ get _tag(): "AbortedError";
245
228
  stack?: string;
246
229
  cause?: unknown;
247
230
  };
248
- code: "ABORTED";
231
+ name: "AbortedError";
249
232
  is(error: unknown): error is BaseError;
250
233
  wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
251
234
  ifTypeDiffers?: boolean;
252
235
  }) | undefined): (error: unknown) => {
253
- code: "ABORTED";
236
+ name: "AbortedError";
254
237
  context: Record<string, unknown>;
255
- get name(): "ABORTED";
256
238
  get message(): string;
257
- get _tag(): "ABORTED";
239
+ get _tag(): "AbortedError";
258
240
  stack?: string;
259
241
  cause?: unknown;
260
242
  };
261
- extend<Code extends string = string>(code: Code, message?: string): {
243
+ extend<Name extends string = string>(name: Name, message?: string): {
262
244
  new (options?: import("./base").BaseErrorOptions): {
263
- code: Code;
245
+ name: Name;
264
246
  context: Record<string, unknown>;
265
- get name(): Code;
266
247
  get message(): string;
267
- get _tag(): Code;
248
+ get _tag(): Name;
268
249
  stack?: string;
269
250
  cause?: unknown;
270
251
  };
271
- code: Code;
252
+ name: Name;
272
253
  is(error: unknown): error is BaseError;
273
254
  wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
274
255
  ifTypeDiffers?: boolean;
275
256
  }): (error: unknown) => {
276
- code: Code;
257
+ name: Name;
277
258
  context: Record<string, unknown>;
278
- get name(): Code;
279
259
  get message(): string;
280
- get _tag(): Code;
260
+ get _tag(): Name;
281
261
  stack?: string;
282
262
  cause?: unknown;
283
263
  };
284
- extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
264
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
285
265
  isError(error: unknown): error is Error;
286
266
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
287
267
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
@@ -296,51 +276,47 @@ export declare class AbortedError extends AbortedError_base {
296
276
  }
297
277
  declare const NotImplementedError_base: {
298
278
  new (options?: import("./base").BaseErrorOptions): {
299
- code: "NOT_IMPLEMENTED";
279
+ name: "NotImplementedError";
300
280
  context: Record<string, unknown>;
301
- get name(): "NOT_IMPLEMENTED";
302
281
  get message(): string;
303
- get _tag(): "NOT_IMPLEMENTED";
282
+ get _tag(): "NotImplementedError";
304
283
  stack?: string;
305
284
  cause?: unknown;
306
285
  };
307
- code: "NOT_IMPLEMENTED";
286
+ name: "NotImplementedError";
308
287
  is(error: unknown): error is BaseError;
309
288
  wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
310
289
  ifTypeDiffers?: boolean;
311
290
  }) | undefined): (error: unknown) => {
312
- code: "NOT_IMPLEMENTED";
291
+ name: "NotImplementedError";
313
292
  context: Record<string, unknown>;
314
- get name(): "NOT_IMPLEMENTED";
315
293
  get message(): string;
316
- get _tag(): "NOT_IMPLEMENTED";
294
+ get _tag(): "NotImplementedError";
317
295
  stack?: string;
318
296
  cause?: unknown;
319
297
  };
320
- extend<Code extends string = string>(code: Code, message?: string): {
298
+ extend<Name extends string = string>(name: Name, message?: string): {
321
299
  new (options?: import("./base").BaseErrorOptions): {
322
- code: Code;
300
+ name: Name;
323
301
  context: Record<string, unknown>;
324
- get name(): Code;
325
302
  get message(): string;
326
- get _tag(): Code;
303
+ get _tag(): Name;
327
304
  stack?: string;
328
305
  cause?: unknown;
329
306
  };
330
- code: Code;
307
+ name: Name;
331
308
  is(error: unknown): error is BaseError;
332
309
  wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
333
310
  ifTypeDiffers?: boolean;
334
311
  }): (error: unknown) => {
335
- code: Code;
312
+ name: Name;
336
313
  context: Record<string, unknown>;
337
- get name(): Code;
338
314
  get message(): string;
339
- get _tag(): Code;
315
+ get _tag(): Name;
340
316
  stack?: string;
341
317
  cause?: unknown;
342
318
  };
343
- extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
319
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
344
320
  isError(error: unknown): error is Error;
345
321
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
346
322
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
@@ -353,5 +329,60 @@ declare const NotImplementedError_base: {
353
329
  };
354
330
  export declare class NotImplementedError extends NotImplementedError_base {
355
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
+ }
356
387
  export {};
357
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAaua,CAAC;;;;;;;;;;;;;;;;;;;;;AAX3c,qBAAa,QAAS,SAAQ,aAAoC;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAWqY,C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