Skip to content

improvement/1049: Refactor Exceptions to Use Base Initializer #49

@babakjahan

Description

@babakjahan

Summary

Refactor the exception hierarchy to remove custom init methods from individual exception classes and rely on AppBaseException for all initialization logic.

Problem

Current exception classes duplicate constructor logic, making the code harder to maintain and extend.

Proposed Change

Move all initialization logic to AppBaseException

Define defaults (default_error_code, default_message, default_status_code) at the class level

Remove init methods from child exceptions (InternalServerException, BadRequestException, etc.)

Acceptance Criteria

  • No child exception defines init
  • Behavior remains backward compatible
  • Code is simpler and consistent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions