@compforge/harness-toolbox 0.4.7 → 0.4.8

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.
@@ -19,8 +19,10 @@ function describeOpenSearchError(error) {
19
19
  seen.add(error);
20
20
  const value = error;
21
21
  const safe = (value2) => typeof value2 === "number" ? String(value2) : typeof value2 === "string" && /^[a-zA-Z0-9_.-]{1,80}$/.test(value2) ? value2 : undefined;
22
+ const argument = (value.code === "ERR_INVALID_ARG_VALUE" || value.code === "ERR_INVALID_ARG_TYPE") && typeof value.message === "string" ? value.message.match(/^The ["']([a-zA-Z][a-zA-Z0-9_.]{0,79})["'] (?:argument|option|property)/)?.[1] ?? value.message.match(/^The (?:argument|option|property) ["']([a-zA-Z][a-zA-Z0-9_.]{0,79})["']/)?.[1] : undefined;
22
23
  parts.push([
23
24
  `error=${safe(value.name) ?? "Error"}`,
25
+ argument && `argument=${argument}`,
24
26
  safe(value.code) && `code=${safe(value.code)}`,
25
27
  safe(value.kind) && `kind=${safe(value.kind)}`,
26
28
  safe(value.statusCode ?? value.meta?.statusCode) && `status=${safe(value.statusCode ?? value.meta?.statusCode)}`
@@ -165,7 +167,9 @@ class OpenSearchClient {
165
167
  await engine.ping(attempt.signal, attempt.remainingMs());
166
168
  return { connection: engine, transport: transport.name };
167
169
  } catch (error) {
168
- await engine.close();
170
+ try {
171
+ await engine.close();
172
+ } catch {}
169
173
  throw error;
170
174
  }
171
175
  },
@@ -4,7 +4,7 @@ import {
4
4
  describeOpenSearchError,
5
5
  isOpenSearchReadApi,
6
6
  openOpenSearch
7
- } from "../chunk-m4d29vfd.js";
7
+ } from "../chunk-vymm4g9h.js";
8
8
  import"../chunk-gm4swndx.js";
9
9
  import"../chunk-rkt41za2.js";
10
10
  import"../chunk-h8fwx0k7.js";
@@ -11,7 +11,7 @@ import {
11
11
  describeOpenSearchError,
12
12
  isOpenSearchReadApi,
13
13
  openOpenSearch
14
- } from "../chunk-m4d29vfd.js";
14
+ } from "../chunk-vymm4g9h.js";
15
15
  import"../chunk-gm4swndx.js";
16
16
  import"../chunk-rkt41za2.js";
17
17
  import"../chunk-h8fwx0k7.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compforge/harness-toolbox",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Shared infrastructure clients, transports and bounded data capture",
5
5
  "type": "module",
6
6
  "scripts": {