Skip to main content

Overview

Violation handlers allow you to react to specific compliance violations in your code. Instead of just receiving alerts, you can programmatically handle violations and take custom actions.

Basic Usage

Violation-Specific Handlers

Handle specific violation types:

Risk Level Handlers

Handle violations by risk level:

Signal Properties

The signal object contains detailed information about the violation:

Example Handlers

Security Incident Response

PII Data Protection

Bias Detection Response

Combining with Alerts

Use violation handlers alongside alerts for comprehensive coverage:

Error Handling

Handle errors in violation handlers gracefully:

Best Practices

1. Keep Handlers Fast

Violation handlers should be fast and non-blocking:

2. Use Appropriate Log Levels

Log violations at appropriate levels:

3. Implement Circuit Breakers

Prevent cascading failures:

Next Steps

Alerts

Set up real-time alerts

Blocking Mode

Block requests based on violations

Dashboard

View violations in the dashboard

API Reference

Explore the REST API