Pattern Engine
How BugOracle's Pattern Engine provides instant fixes for common errors.
Pattern Engine
BugOracle's Pattern Engine is a high-performance, rule-based system that identifies common error patterns instantly—before we even call an LLM.
How It Works
- Normalization: Incoming errors are standardized (stack trace parsing, message extraction).
- Matching: The normalized error is compared against 100+ seed patterns.
- Scoring: Each pattern match receives a confidence score (0-100%).
- Fast Path: If score > 90%, we return the fix immediately. No AI needed.
Supported Patterns
| Category | Examples |
| ----------------- | --------------------------------------------------- |
| Network | ECONNREFUSED, 504 Gateway Timeout, CORS Error |
| React/Next.js | Hydration Mismatch, Objects not valid as child |
| Database | Unique constraint violation, Connection timeout |
| Auth | JWT malformed, 401 Unauthorized |
| Build | Module not found, Cannot find module |
Adding Custom Patterns
Enterprise users can define custom patterns specific to their stack:
{
"code": "CUSTOM_001",
"name": "My Custom Error",
"regex": "MyAppError: .+",
"language": "typescript",
"baseRunbook": ["Check the MyApp config file", "Restart the service"]
}
Contact support to enable custom patterns for your workspace.
API Integration
Pattern matching is automatically applied to:
/api/analyze(manual analysis)/api/v1/ingest(SDK errors)
The response includes patternCode and patternScore if a match is found.