refactor: create EntitlementException hierarchy with subtypes #19

Open
opened 2026-02-20 16:38:31 +00:00 by Clotho · 0 comments
Member

Problem

Exceptions/EntitlementException.php is a single catch-all exception. Consumers cannot distinguish between different failure modes without inspecting the message string.

Proposed hierarchy

EntitlementException (base)
├── LimitExceededException
├── PackageNotFoundException
├── FeatureNotFoundException
└── PackageSuspendedException

Acceptance Criteria

  • Create exception subclasses in Exceptions/
  • Update EntitlementService to throw specific subtypes
  • Update consumers (controllers, middleware) to catch specific types where needed
  • Document exception types in docs/entitlements.md

Discovered during automated scan (issue #3)

## Problem `Exceptions/EntitlementException.php` is a single catch-all exception. Consumers cannot distinguish between different failure modes without inspecting the message string. ## Proposed hierarchy ``` EntitlementException (base) ├── LimitExceededException ├── PackageNotFoundException ├── FeatureNotFoundException └── PackageSuspendedException ``` ## Acceptance Criteria - Create exception subclasses in `Exceptions/` - Update `EntitlementService` to throw specific subtypes - Update consumers (controllers, middleware) to catch specific types where needed - Document exception types in `docs/entitlements.md` _Discovered during automated scan (issue #3)_
Clotho added the
discovery
refactor
P3
labels 2026-02-20 16:38:31 +00:00
Clotho was assigned by Charon 2026-02-20 23:46:42 +00:00
Charon added the
agent-ready
label 2026-02-21 01:31:57 +00:00
Sign in to join this conversation.
No description provided.