@mastra/server 0.0.0-fix-fetching-workflow-snapshots-20250625000954 → 0.0.0-http-transporter-20250702160118

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.
Files changed (65) hide show
  1. package/dist/_tsup-dts-rollup.d.cts +77 -3
  2. package/dist/_tsup-dts-rollup.d.ts +77 -3
  3. package/dist/{chunk-OCWPVYNI.cjs → chunk-2KZFMI6P.cjs} +1 -0
  4. package/dist/{chunk-VPNDC2DI.cjs → chunk-2SLFAFTR.cjs} +12 -12
  5. package/dist/{chunk-QLG2PFHE.js → chunk-4D66QEKC.js} +2 -2
  6. package/dist/{chunk-N2YBMSO2.js → chunk-5PQQ42EZ.js} +8 -8
  7. package/dist/{chunk-BNEY4P4P.cjs → chunk-7TP2LX5L.cjs} +16 -16
  8. package/dist/{chunk-TO5U6HW3.cjs → chunk-B2PAS2IB.cjs} +147 -68
  9. package/dist/{chunk-PMUATKV2.js → chunk-BK4XT6EG.js} +5 -5
  10. package/dist/{chunk-57CJTIPW.cjs → chunk-CCGRCYWJ.cjs} +2 -2
  11. package/dist/{chunk-C7564HUT.js → chunk-CRCR3ZUK.js} +3 -3
  12. package/dist/{chunk-RQ2Z56EC.cjs → chunk-DN7K6FJK.cjs} +34 -34
  13. package/dist/{chunk-CPPYMJX5.cjs → chunk-FRVBFMO2.cjs} +20 -20
  14. package/dist/{chunk-B4MQFJ7G.cjs → chunk-G7KH752Y.cjs} +5 -5
  15. package/dist/{chunk-SOBBILUG.js → chunk-H7DMHBKY.js} +89 -12
  16. package/dist/{chunk-4DTDPTQC.cjs → chunk-JMLYCXMK.cjs} +43 -43
  17. package/dist/{chunk-R5VGYBV6.js → chunk-KHZKYUNR.js} +3 -3
  18. package/dist/{chunk-NYN7KFXL.js → chunk-LCM566I4.js} +1 -0
  19. package/dist/chunk-LF7P5PLR.js +14 -0
  20. package/dist/{chunk-MN6F4D5A.cjs → chunk-LI436ITD.cjs} +107 -69
  21. package/dist/{chunk-XR7VJOOP.js → chunk-LRCAAFUA.js} +4 -4
  22. package/dist/{chunk-GKM45O24.cjs → chunk-LZ3VJXSO.cjs} +19 -19
  23. package/dist/{chunk-OSZM4EAY.js → chunk-MEGCYGBU.js} +108 -70
  24. package/dist/{chunk-XUIJ7WRT.js → chunk-MKLYEKEF.js} +3 -3
  25. package/dist/chunk-PZQDCRPV.cjs +16 -0
  26. package/dist/{chunk-IMBY5XUG.cjs → chunk-QGX47B5D.cjs} +7 -7
  27. package/dist/{chunk-BFOA2QQY.js → chunk-RG473F6Y.js} +2 -2
  28. package/dist/{chunk-WJY57THV.cjs → chunk-RHSWAXKB.cjs} +22 -22
  29. package/dist/{chunk-H5PTF3Y4.js → chunk-RSEO4XPX.js} +1 -1
  30. package/dist/{chunk-55DOQLP6.js → chunk-WNVFNNWN.js} +2 -2
  31. package/dist/server/handlers/agents.cjs +7 -7
  32. package/dist/server/handlers/agents.js +1 -1
  33. package/dist/server/handlers/error.cjs +2 -2
  34. package/dist/server/handlers/error.js +1 -1
  35. package/dist/server/handlers/legacyWorkflows.cjs +11 -11
  36. package/dist/server/handlers/legacyWorkflows.js +1 -1
  37. package/dist/server/handlers/logs.cjs +4 -4
  38. package/dist/server/handlers/logs.js +1 -1
  39. package/dist/server/handlers/memory.cjs +9 -9
  40. package/dist/server/handlers/memory.js +1 -1
  41. package/dist/server/handlers/network.cjs +5 -5
  42. package/dist/server/handlers/network.js +1 -1
  43. package/dist/server/handlers/telemetry.cjs +3 -3
  44. package/dist/server/handlers/telemetry.js +1 -1
  45. package/dist/server/handlers/tools.cjs +5 -5
  46. package/dist/server/handlers/tools.js +1 -1
  47. package/dist/server/handlers/utils.cjs +2 -2
  48. package/dist/server/handlers/utils.js +1 -1
  49. package/dist/server/handlers/vNextNetwork.cjs +63 -20
  50. package/dist/server/handlers/vNextNetwork.d.cts +1 -0
  51. package/dist/server/handlers/vNextNetwork.d.ts +1 -0
  52. package/dist/server/handlers/vNextNetwork.js +47 -5
  53. package/dist/server/handlers/vector.cjs +7 -7
  54. package/dist/server/handlers/vector.js +1 -1
  55. package/dist/server/handlers/voice.cjs +5 -5
  56. package/dist/server/handlers/voice.js +1 -1
  57. package/dist/server/handlers/workflows.cjs +21 -13
  58. package/dist/server/handlers/workflows.d.cts +2 -0
  59. package/dist/server/handlers/workflows.d.ts +2 -0
  60. package/dist/server/handlers/workflows.js +1 -1
  61. package/dist/server/handlers.cjs +20 -20
  62. package/dist/server/handlers.js +10 -10
  63. package/package.json +5 -5
  64. package/dist/chunk-64U3UDTH.cjs +0 -13
  65. package/dist/chunk-M5ABIP7D.js +0 -11
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkMN6F4D5A_cjs = require('./chunk-MN6F4D5A.cjs');
4
- var chunk64U3UDTH_cjs = require('./chunk-64U3UDTH.cjs');
5
- var chunkOCWPVYNI_cjs = require('./chunk-OCWPVYNI.cjs');
3
+ var chunkLI436ITD_cjs = require('./chunk-LI436ITD.cjs');
4
+ var chunkPZQDCRPV_cjs = require('./chunk-PZQDCRPV.cjs');
5
+ var chunk2KZFMI6P_cjs = require('./chunk-2KZFMI6P.cjs');
6
6
  var chunk75ZPJI57_cjs = require('./chunk-75ZPJI57.cjs');
7
7
  var web = require('stream/web');
8
8
 
@@ -31,15 +31,15 @@ async function getLegacyWorkflowsHandler({ mastra }) {
31
31
  serializedStepGraph: workflow.serializedStepGraph,
32
32
  serializedStepSubscriberGraph: workflow.serializedStepSubscriberGraph,
33
33
  name: workflow.name,
34
- triggerSchema: workflow.triggerSchema ? chunkMN6F4D5A_cjs.stringify(chunkMN6F4D5A_cjs.esm_default(workflow.triggerSchema)) : void 0,
34
+ triggerSchema: workflow.triggerSchema ? chunkLI436ITD_cjs.stringify(chunkLI436ITD_cjs.esm_default(workflow.triggerSchema)) : void 0,
35
35
  steps: Object.entries(workflow.steps).reduce((acc2, [key2, step]) => {
36
36
  const _step = step;
37
37
  acc2[key2] = {
38
38
  id: _step.id,
39
39
  description: _step.description,
40
40
  workflowId: _step.workflowId,
41
- inputSchema: _step.inputSchema ? chunkMN6F4D5A_cjs.stringify(chunkMN6F4D5A_cjs.esm_default(_step.inputSchema)) : void 0,
42
- outputSchema: _step.outputSchema ? chunkMN6F4D5A_cjs.stringify(chunkMN6F4D5A_cjs.esm_default(_step.outputSchema)) : void 0
41
+ inputSchema: _step.inputSchema ? chunkLI436ITD_cjs.stringify(chunkLI436ITD_cjs.esm_default(_step.inputSchema)) : void 0,
42
+ outputSchema: _step.outputSchema ? chunkLI436ITD_cjs.stringify(chunkLI436ITD_cjs.esm_default(_step.outputSchema)) : void 0
43
43
  };
44
44
  return acc2;
45
45
  }, {})
@@ -48,17 +48,17 @@ async function getLegacyWorkflowsHandler({ mastra }) {
48
48
  }, {});
49
49
  return _workflows;
50
50
  } catch (error) {
51
- throw new chunkOCWPVYNI_cjs.HTTPException(500, { message: error?.message || "Error getting workflows" });
51
+ return chunkPZQDCRPV_cjs.handleError(error, "error getting workflows");
52
52
  }
53
53
  }
54
54
  async function getLegacyWorkflowByIdHandler({ mastra, workflowId }) {
55
55
  try {
56
56
  if (!workflowId) {
57
- throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "Workflow ID is required" });
57
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "Workflow ID is required" });
58
58
  }
59
59
  const workflow = mastra.legacy_getWorkflow(workflowId);
60
60
  if (!workflow) {
61
- throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Workflow not found" });
61
+ throw new chunk2KZFMI6P_cjs.HTTPException(404, { message: "Workflow not found" });
62
62
  }
63
63
  return {
64
64
  stepGraph: workflow.stepGraph,
@@ -66,21 +66,21 @@ async function getLegacyWorkflowByIdHandler({ mastra, workflowId }) {
66
66
  serializedStepGraph: workflow.serializedStepGraph,
67
67
  serializedStepSubscriberGraph: workflow.serializedStepSubscriberGraph,
68
68
  name: workflow.name,
69
- triggerSchema: workflow.triggerSchema ? chunkMN6F4D5A_cjs.stringify(chunkMN6F4D5A_cjs.esm_default(workflow.triggerSchema)) : void 0,
69
+ triggerSchema: workflow.triggerSchema ? chunkLI436ITD_cjs.stringify(chunkLI436ITD_cjs.esm_default(workflow.triggerSchema)) : void 0,
70
70
  steps: Object.entries(workflow.steps).reduce((acc, [key, step]) => {
71
71
  const _step = step;
72
72
  acc[key] = {
73
73
  id: _step.id,
74
74
  description: _step.description,
75
75
  workflowId: _step.workflowId,
76
- inputSchema: _step.inputSchema ? chunkMN6F4D5A_cjs.stringify(chunkMN6F4D5A_cjs.esm_default(_step.inputSchema)) : void 0,
77
- outputSchema: _step.outputSchema ? chunkMN6F4D5A_cjs.stringify(chunkMN6F4D5A_cjs.esm_default(_step.outputSchema)) : void 0
76
+ inputSchema: _step.inputSchema ? chunkLI436ITD_cjs.stringify(chunkLI436ITD_cjs.esm_default(_step.inputSchema)) : void 0,
77
+ outputSchema: _step.outputSchema ? chunkLI436ITD_cjs.stringify(chunkLI436ITD_cjs.esm_default(_step.outputSchema)) : void 0
78
78
  };
79
79
  return acc;
80
80
  }, {})
81
81
  };
82
82
  } catch (error) {
83
- throw new chunkOCWPVYNI_cjs.HTTPException(500, { message: error?.message || "Error getting workflow" });
83
+ return chunkPZQDCRPV_cjs.handleError(error, "error getting workflow by id");
84
84
  }
85
85
  }
86
86
  async function startAsyncLegacyWorkflowHandler({
@@ -92,11 +92,11 @@ async function startAsyncLegacyWorkflowHandler({
92
92
  }) {
93
93
  try {
94
94
  if (!workflowId) {
95
- throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "Workflow ID is required" });
95
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "Workflow ID is required" });
96
96
  }
97
97
  const workflow = mastra.legacy_getWorkflow(workflowId);
98
98
  if (!workflow) {
99
- throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Workflow not found" });
99
+ throw new chunk2KZFMI6P_cjs.HTTPException(404, { message: "Workflow not found" });
100
100
  }
101
101
  if (!runId) {
102
102
  const newRun = workflow.createRun();
@@ -108,7 +108,7 @@ async function startAsyncLegacyWorkflowHandler({
108
108
  }
109
109
  const run = workflow.getMemoryRun(runId);
110
110
  if (!run) {
111
- throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Workflow run not found" });
111
+ throw new chunk2KZFMI6P_cjs.HTTPException(404, { message: "Workflow run not found" });
112
112
  }
113
113
  const result = await run.start({
114
114
  triggerData,
@@ -116,7 +116,7 @@ async function startAsyncLegacyWorkflowHandler({
116
116
  });
117
117
  return result;
118
118
  } catch (error) {
119
- throw new chunkOCWPVYNI_cjs.HTTPException(500, { message: error?.message || "Error executing workflow" });
119
+ return chunkPZQDCRPV_cjs.handleError(error, "error starting workflow");
120
120
  }
121
121
  }
122
122
  async function getLegacyWorkflowRunHandler({
@@ -126,22 +126,22 @@ async function getLegacyWorkflowRunHandler({
126
126
  }) {
127
127
  try {
128
128
  if (!workflowId) {
129
- throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "Workflow ID is required" });
129
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "Workflow ID is required" });
130
130
  }
131
131
  if (!runId) {
132
- throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "Run ID is required" });
132
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "Run ID is required" });
133
133
  }
134
134
  const workflow = mastra.legacy_getWorkflow(workflowId);
135
135
  if (!workflow) {
136
- throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Workflow not found" });
136
+ throw new chunk2KZFMI6P_cjs.HTTPException(404, { message: "Workflow not found" });
137
137
  }
138
138
  const run = await workflow.getRun(runId);
139
139
  if (!run) {
140
- throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Workflow run not found" });
140
+ throw new chunk2KZFMI6P_cjs.HTTPException(404, { message: "Workflow run not found" });
141
141
  }
142
142
  return run;
143
143
  } catch (error) {
144
- throw new chunkOCWPVYNI_cjs.HTTPException(500, { message: error?.message || "Error getting workflow run" });
144
+ return chunkPZQDCRPV_cjs.handleError(error, "error getting workflow run");
145
145
  }
146
146
  }
147
147
  async function createLegacyWorkflowRunHandler({
@@ -151,16 +151,16 @@ async function createLegacyWorkflowRunHandler({
151
151
  }) {
152
152
  try {
153
153
  if (!workflowId) {
154
- throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "Workflow ID is required" });
154
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "Workflow ID is required" });
155
155
  }
156
156
  const workflow = mastra.legacy_getWorkflow(workflowId);
157
157
  if (!workflow) {
158
- throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Workflow not found" });
158
+ throw new chunk2KZFMI6P_cjs.HTTPException(404, { message: "Workflow not found" });
159
159
  }
160
160
  const newRun = workflow.createRun({ runId: prevRunId });
161
161
  return { runId: newRun.runId };
162
162
  } catch (error) {
163
- throw new chunkOCWPVYNI_cjs.HTTPException(500, { message: error?.message || "Error creating workflow run" });
163
+ return chunkPZQDCRPV_cjs.handleError(error, "error creating workflow run");
164
164
  }
165
165
  }
166
166
  async function startLegacyWorkflowRunHandler({
@@ -172,15 +172,15 @@ async function startLegacyWorkflowRunHandler({
172
172
  }) {
173
173
  try {
174
174
  if (!workflowId) {
175
- throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "Workflow ID is required" });
175
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "Workflow ID is required" });
176
176
  }
177
177
  if (!runId) {
178
- throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "runId required to start run" });
178
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "runId required to start run" });
179
179
  }
180
180
  const workflow = mastra.legacy_getWorkflow(workflowId);
181
181
  const run = workflow.getMemoryRun(runId);
182
182
  if (!run) {
183
- throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Workflow run not found" });
183
+ throw new chunk2KZFMI6P_cjs.HTTPException(404, { message: "Workflow run not found" });
184
184
  }
185
185
  void run.start({
186
186
  triggerData,
@@ -188,7 +188,7 @@ async function startLegacyWorkflowRunHandler({
188
188
  });
189
189
  return { message: "Workflow run started" };
190
190
  } catch (e) {
191
- return chunk64U3UDTH_cjs.handleError(e, "Error starting workflow run");
191
+ return chunkPZQDCRPV_cjs.handleError(e, "Error starting workflow run");
192
192
  }
193
193
  }
194
194
  async function watchLegacyWorkflowHandler({
@@ -198,15 +198,15 @@ async function watchLegacyWorkflowHandler({
198
198
  }) {
199
199
  try {
200
200
  if (!workflowId) {
201
- throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "Workflow ID is required" });
201
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "Workflow ID is required" });
202
202
  }
203
203
  if (!runId) {
204
- throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "runId required to watch workflow" });
204
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "runId required to watch workflow" });
205
205
  }
206
206
  const workflow = mastra.legacy_getWorkflow(workflowId);
207
207
  const run = workflow.getMemoryRun(runId);
208
208
  if (!run) {
209
- throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Workflow run not found" });
209
+ throw new chunk2KZFMI6P_cjs.HTTPException(404, { message: "Workflow run not found" });
210
210
  }
211
211
  let unwatch;
212
212
  let asyncRef = null;
@@ -234,7 +234,7 @@ async function watchLegacyWorkflowHandler({
234
234
  });
235
235
  return stream;
236
236
  } catch (error) {
237
- return chunk64U3UDTH_cjs.handleError(error, "Error watching workflow");
237
+ return chunkPZQDCRPV_cjs.handleError(error, "Error watching workflow");
238
238
  }
239
239
  }
240
240
  async function resumeAsyncLegacyWorkflowHandler({
@@ -246,15 +246,15 @@ async function resumeAsyncLegacyWorkflowHandler({
246
246
  }) {
247
247
  try {
248
248
  if (!workflowId) {
249
- throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "Workflow ID is required" });
249
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "Workflow ID is required" });
250
250
  }
251
251
  if (!runId) {
252
- throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "runId required to resume workflow" });
252
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "runId required to resume workflow" });
253
253
  }
254
254
  const workflow = mastra.legacy_getWorkflow(workflowId);
255
255
  const run = workflow.getMemoryRun(runId);
256
256
  if (!run) {
257
- throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Workflow run not found" });
257
+ throw new chunk2KZFMI6P_cjs.HTTPException(404, { message: "Workflow run not found" });
258
258
  }
259
259
  const result = await run.resume({
260
260
  stepId: body.stepId,
@@ -263,7 +263,7 @@ async function resumeAsyncLegacyWorkflowHandler({
263
263
  });
264
264
  return result;
265
265
  } catch (error) {
266
- return chunk64U3UDTH_cjs.handleError(error, "Error resuming workflow step");
266
+ return chunkPZQDCRPV_cjs.handleError(error, "Error resuming workflow step");
267
267
  }
268
268
  }
269
269
  async function resumeLegacyWorkflowHandler({
@@ -275,15 +275,15 @@ async function resumeLegacyWorkflowHandler({
275
275
  }) {
276
276
  try {
277
277
  if (!workflowId) {
278
- throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "Workflow ID is required" });
278
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "Workflow ID is required" });
279
279
  }
280
280
  if (!runId) {
281
- throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "runId required to resume workflow" });
281
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "runId required to resume workflow" });
282
282
  }
283
283
  const workflow = mastra.legacy_getWorkflow(workflowId);
284
284
  const run = workflow.getMemoryRun(runId);
285
285
  if (!run) {
286
- throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Workflow run not found" });
286
+ throw new chunk2KZFMI6P_cjs.HTTPException(404, { message: "Workflow run not found" });
287
287
  }
288
288
  void run.resume({
289
289
  stepId: body.stepId,
@@ -292,7 +292,7 @@ async function resumeLegacyWorkflowHandler({
292
292
  });
293
293
  return { message: "Workflow run resumed" };
294
294
  } catch (error) {
295
- return chunk64U3UDTH_cjs.handleError(error, "Error resuming workflow");
295
+ return chunkPZQDCRPV_cjs.handleError(error, "Error resuming workflow");
296
296
  }
297
297
  }
298
298
  async function getLegacyWorkflowRunsHandler({
@@ -306,7 +306,7 @@ async function getLegacyWorkflowRunsHandler({
306
306
  }) {
307
307
  try {
308
308
  if (!workflowId) {
309
- throw new chunkOCWPVYNI_cjs.HTTPException(400, { message: "Workflow ID is required" });
309
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "Workflow ID is required" });
310
310
  }
311
311
  const workflow = mastra.legacy_getWorkflow(workflowId);
312
312
  const workflowRuns = await workflow.getWorkflowRuns({ fromDate, toDate, limit, offset, resourceId }) || {
@@ -315,7 +315,7 @@ async function getLegacyWorkflowRunsHandler({
315
315
  };
316
316
  return workflowRuns;
317
317
  } catch (error) {
318
- return chunk64U3UDTH_cjs.handleError(error, "Error getting workflow runs");
318
+ return chunkPZQDCRPV_cjs.handleError(error, "Error getting workflow runs");
319
319
  }
320
320
  }
321
321
 
@@ -1,6 +1,6 @@
1
- import { validateBody } from './chunk-H5PTF3Y4.js';
2
- import { handleError } from './chunk-M5ABIP7D.js';
3
- import { HTTPException } from './chunk-NYN7KFXL.js';
1
+ import { validateBody } from './chunk-RSEO4XPX.js';
2
+ import { handleError } from './chunk-LF7P5PLR.js';
3
+ import { HTTPException } from './chunk-LCM566I4.js';
4
4
  import { __export } from './chunk-MLKGABMK.js';
5
5
  import { Readable } from 'stream';
6
6
 
@@ -11,6 +11,7 @@ var HTTPException = class extends Error {
11
11
  super(options?.message, { cause: options?.cause });
12
12
  this.res = options?.res;
13
13
  this.status = status;
14
+ this.stack = options?.stack || this.stack;
14
15
  }
15
16
  /**
16
17
  * Returns the response object associated with the exception.
@@ -0,0 +1,14 @@
1
+ import { HTTPException } from './chunk-LCM566I4.js';
2
+
3
+ // src/server/handlers/error.ts
4
+ function handleError(error, defaultMessage) {
5
+ const apiError = error;
6
+ const apiErrorStatus = apiError.status || apiError.details?.status || 500;
7
+ throw new HTTPException(apiErrorStatus, {
8
+ message: apiError.message || defaultMessage,
9
+ stack: apiError.stack,
10
+ cause: apiError.cause
11
+ });
12
+ }
13
+
14
+ export { handleError };