Errors
Trailproof uses a structured error hierarchy. All errors extendTrailproofError.
Error Hierarchy
Error Message Format
All errors follow a consistent format:Trailproof: missing required field -- actor_id is requiredTrailproof: store write failed -- permission deniedTrailproof: HMAC verification failed -- signature mismatch
ValidationError
Thrown byemit() when required fields are missing or empty.
ValidationError when missing or empty:
event_type/eventTypeactor_id/actorIdtenant_id/tenantIdpayload
StoreError
Thrown when the storage backend fails — for example, when the JSONL file can’t be written.Python
ChainError
Represents a broken hash chain. Note thatverify() does not throw this error — it returns a VerifyResult with intact: false. ChainError is available for application code that needs to raise chain-related errors.
SignatureError
Thrown when HMAC verification fails — for example, when an event has asignature field but no signing key is configured.
Python