dashclaw 2.1.0 → 2.1.1

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/dashclaw.js +4 -2
  2. package/package.json +1 -1
package/dashclaw.js CHANGED
@@ -57,10 +57,12 @@ class DashClaw {
57
57
  const data = await res.json();
58
58
 
59
59
  if (!res.ok) {
60
- const err = new Error(data.error || `Request failed with status ${res.status}`);
60
+ // Prioritize reason (from governance blocks) over generic error field
61
+ const errorMessage = data.reason || data.error || `Request failed with status ${res.status}`;
62
+ const err = new Error(errorMessage);
61
63
  err.status = res.status;
62
64
  err.details = data.details;
63
- err.decision = data.decision;
65
+ err.decision = data;
64
66
  throw err;
65
67
  }
66
68
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dashclaw",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Minimal governance runtime for AI agents. Intercept, govern, and verify agent actions.",
5
5
  "type": "module",
6
6
  "publishConfig": {