jstmichel-beagl-webapp-error-handling-instructions.ocm.json json Copy{
"ocm": "1",
"id": "jstmichel-beagl-webapp-error-handling-instructions",
"kind": "skill",
"name": "error-handling",
"description": "Result pattern, validation ownership, and exception rules for Beagl source code.",
"publisher": "jstmichel",
"version": "1.0.0",
"capabilities": {
"domains": [
"coding"
],
"tags": [
"skill-md",
"github-instructions"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Result pattern, validation ownership, and exception rules for Beagl source code."
],
"primary": false,
"metadata": {
"source": {
"provider": "github-instructions",
"repository": "https://github.com/jstmichel/beagl-webapp",
"path": ".github/instructions/error-handling.instructions.md",
"ref": "89ca26eb40e97c70f8f147c3fee189d369a26af1",
"url": "https://github.com/jstmichel/beagl-webapp/blob/89ca26eb40e97c70f8f147c3fee189d369a26af1/.github/instructions/error-handling.instructions.md",
"key": "jstmichel/beagl-webapp/.github/instructions/error-handling.instructions.md"
},
"applies_to": "src/**/*.cs"
},
"instructions": "# Error Handling Instructions\n\n## Expected Errors\n\n- Use the `Result<T>` pattern for expected errors in all layers.\n- Do not use exceptions for validation or business errors.\n- Only catch exceptions when explicitly handling them.\n- Use custom exception types when relevant.\n\n## Domain Exceptions\n\n- Only throw exceptions in Domain aggregates, entities, and value objects for invariant violations.\n- Domain exceptions must inherit from `DomainException`.\n\n## Validation Ownership\n\n- Input validation belongs in Application.\n- Domain enforces invariants only.\n- Do not mix validation logic with UI conc",
"cost": {
"context_tokens": 180
}
}