@nikcli-ai/sdk 1.348.0 → 1.350.0

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.
@@ -2,7 +2,13 @@ export class ClientError extends Error {
2
2
  reason;
3
3
  name = "ClientError";
4
4
  constructor(reason, options) {
5
- super(reason, options);
5
+ // The reason alone is not a diagnosis: a caller that only prints error.message
6
+ // (core.setFailed in the GitHub action, and most log sinks) reported a bare
7
+ // "Transport" for connection refused, connection reset, DNS failure and abort
8
+ // alike. Fold the cause in so the message names what actually went wrong.
9
+ const cause = options?.cause;
10
+ const detail = cause instanceof Error ? cause.message : typeof cause === "string" ? cause : undefined;
11
+ super(detail ? reason + ": " + detail : reason, options);
6
12
  this.reason = reason;
7
13
  }
8
14
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@nikcli-ai/sdk",
4
- "version": "1.348.0",
4
+ "version": "1.350.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {