Skip to content

docs(arcjet): document guard error/warning model in guard references#21

Open
qw-in wants to merge 1 commit into
mainfrom
quinn/guard-error-warning-model
Open

docs(arcjet): document guard error/warning model in guard references#21
qw-in wants to merge 1 commit into
mainfrom
quinn/guard-error-warning-model

Conversation

@qw-in

@qw-in qw-in commented Jun 26, 2026

Copy link
Copy Markdown
Member

Add an "Errors vs warnings (failing open)" section to the JS and Python guard references covering the new decision API:

  • hasFailedOpen() / has_failed_open() — the fail-closed gate (ALLOW only because a rule or the decision could not be processed)
  • errorResults() / error_results() — the errored results, for logging
  • warnings — request-validation diagnostics that never change the conclusion

Version-gated: available from @arcjet/guard 1.6.0 and arcjet 0.9.0. hasError() / has_error() is deprecated from those versions (it conflated request diagnostics with rule errors). Guidance tells the agent to check the installed package's types and prefer hasFailedOpen when present.

Add an "Errors vs warnings (failing open)" section to the JS and Python
guard references covering the new decision API:

* hasFailedOpen() / has_failed_open() — the fail-closed gate (ALLOW only
  because a rule or the decision could not be processed)
* errorResults() / error_results() — the errored results, for logging
* warnings — request-validation diagnostics that never change the
  conclusion

Version-gated: available from @arcjet/guard 1.6.0 and arcjet 0.9.0.
hasError() / has_error() is deprecated from those versions (it conflated
request diagnostics with rule errors). Guidance tells the agent to check
the installed package's types and prefer hasFailedOpen when present.

Co-Authored-By: Claude <noreply@anthropic.com>
@qw-in qw-in self-assigned this Jun 26, 2026
@qw-in qw-in enabled auto-merge (squash) June 26, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant