dashclaw 2.2.0 → 2.2.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.
- package/dashclaw.js +4 -0
- package/package.json +1 -1
package/dashclaw.js
CHANGED
|
@@ -57,6 +57,10 @@ class DashClaw {
|
|
|
57
57
|
const data = await res.json();
|
|
58
58
|
|
|
59
59
|
if (!res.ok) {
|
|
60
|
+
if (res.status === 403 && data.decision && data.decision.decision === 'block') {
|
|
61
|
+
throw new GuardBlockedError(data.decision);
|
|
62
|
+
}
|
|
63
|
+
|
|
60
64
|
// Prioritize reason (from governance blocks) over generic error field
|
|
61
65
|
const errorMessage = data.reason || data.error || `Request failed with status ${res.status}`;
|
|
62
66
|
const err = new Error(errorMessage);
|