Skip to content

quality(errors): implement custom exception hierarchy #99

@Snider

Description

@Snider

Parent audit: #51

Finding

The framework uses generic exceptions (RuntimeException, InvalidArgumentException) instead of domain-specific exceptions, making error handling imprecise and catch blocks overly broad.

Fix

Implement a custom exception hierarchy with a base CoreException, then domain-specific exceptions (ModuleException, TenantException, ConfigException, etc.) that extend it.

Acceptance Criteria

  • Base CoreException class created
  • Domain-specific exceptions extend CoreException
  • At minimum: ModuleException, ConfigException, ValidationException
  • Each exception includes contextual data (module name, config key, etc.)
  • Existing generic exception throws replaced with specific ones
  • Exception handler maps custom exceptions to appropriate HTTP codes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions