Faults — Aquilia Documentation
Comprehensive guide and documentation for Faults in the Aquilia framework. View API reference, examples, and implementation patterns.
import useTheme from '../../../context/ThemeContext' import CodeBlock from '../../../components/CodeBlock' import AlertTriangle from 'lucide-react' import NextSteps from '../../../components/NextSteps' export function ContractsFaults() const theme = useTheme() const isDark = theme === 'dark' const boxClass = `p-6 rounded-2xl border $ isDark ? 'bg-[#0A0A0A] border-white/10' : 'bg-white border-gray-200' ` return ( Contracts / Faults Contract Faults Contracts use structured fault types instead of bare exceptions. All Contract errors are part of the CONTRACT fault domain and integrate seamlessly with the AquilaFaults error handling system. /* Fault Taxonomy */ Fault Taxonomy [ code: 'BP100', name: 'CastFault', desc: 'Type coercion failed — raw value could not be converted to expected Python type', severity: 'ERROR' , code: 'BP200', name: 'SealFault', desc: 'Validation failed — one or more fields did not pass seal constraints', severity: 'WARN' , code: 'BP210', name: 'MissingSealFault', desc: 'Required field was missing from input data', severity: 'WARN' , code: 'BP300', name: 'ImprintFault', desc: 'Failed to write validated data to Model instance', severity: 'ERROR' , code: 'BP400', name: 'LensCycleFault', desc: 'Circular reference detected in Contract Lens chain', severity: 'ERROR' , code: 'BP500', name: 'SchemaFault', desc: 'Error generating JSON Schema for this Contract', severity: 'WARN' , ].map((item, i) => ( item.code item.name item.severity item.desc )) /* CastFault */ CastFault Raised when a Facet cannot coerce a raw value to the expected Python type: )
Go to Homepage