spooder 3.2.4 → 3.2.6

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/api.ts +5 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "spooder",
3
3
  "type": "module",
4
- "version": "3.2.4",
4
+ "version": "3.2.6",
5
5
  "exports": {
6
6
  ".": {
7
7
  "bun": "./src/api.ts",
package/src/api.ts CHANGED
@@ -6,6 +6,9 @@ import fs from 'node:fs/promises';
6
6
  export class ErrorWithMetadata extends Error {
7
7
  constructor(message: string, public metadata: Record<string, unknown>) {
8
8
  super(message);
9
+
10
+ if (this.stack)
11
+ this.stack = this.stack.split('\n').slice(1).join('\n');
9
12
  }
10
13
 
11
14
  async resolve_metadata(): Promise<object> {
@@ -51,6 +54,8 @@ async function handle_error(prefix: string, err_message_or_obj: string | object,
51
54
  report.metadata = await e.resolve_metadata();
52
55
 
53
56
  final_err[i] = report;
57
+ } else {
58
+ final_err[i] = e;
54
59
  }
55
60
  }
56
61