feat(registry): implement error hierarchy — RegistryError base + all 8 error types #29

Open
opened 2026-06-05 17:34:42 +00:00 by CoreRasurae · 0 comments
Member

Metadata

Commit Message: feat(registry): implement RegistryError hierarchy with typed exceptions
Branch: feature/m1-registry-exceptions

Background and context

The Package Registry Standard v1.0.0 (§13) defines 8 error types with specific HTTP status codes. All errors must carry a human-readable message and optional details. The error hierarchy extends the existing CleverAgentsException base.

Part of Epic: Package Registry Client — Support Package Registry Standard v1.0.0

Current behavior

No registry-specific exception types exist.

Expected behavior

CleverAgentsException (existing)
  └── RegistryError (new base)
        ├── PackageNotFoundError        (404)
        ├── InvalidPackageIdError       (400)
        ├── InvalidPackageReferenceError(400)
        ├── VersionNotFoundError         (404)
        ├── ValidationError              (400)
        ├── AuthenticationRequiredError  (401)
        ├── AccessDeniedError            (403)
        ├── ConflictError                (409)
        └── RegistryNetworkError         (timeout/connection/500)

Acceptance criteria

  • All errors carry message, optional details: dict, optional original_reference: str
  • HTTP error responses mapped to correct typed exceptions
  • RegistryNetworkError carries status_code and url
  • __str__ includes original reference when available
  • Errors importable from cleveractors.registry

Subtasks

  • Create src/cleveractors/registry/exceptions.py with full hierarchy
  • Implement RegistryError base with message, details, original_reference fields
  • Implement all 8 typed exceptions
  • Export from src/cleveractors/registry/__init__.py
  • Tests (Behave): features/registry_exceptions.feature — construction, HTTP mapping, str representation
  • Verify coverage >=97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line matches the Commit Message in Metadata exactly.
  • The commit is pushed to the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a PR to master, reviewed, and merged.
## Metadata Commit Message: feat(registry): implement RegistryError hierarchy with typed exceptions Branch: feature/m1-registry-exceptions ## Background and context The Package Registry Standard v1.0.0 (§13) defines 8 error types with specific HTTP status codes. All errors must carry a human-readable message and optional details. The error hierarchy extends the existing `CleverAgentsException` base. Part of Epic: Package Registry Client — Support Package Registry Standard v1.0.0 ## Current behavior No registry-specific exception types exist. ## Expected behavior ``` CleverAgentsException (existing) └── RegistryError (new base) ├── PackageNotFoundError (404) ├── InvalidPackageIdError (400) ├── InvalidPackageReferenceError(400) ├── VersionNotFoundError (404) ├── ValidationError (400) ├── AuthenticationRequiredError (401) ├── AccessDeniedError (403) ├── ConflictError (409) └── RegistryNetworkError (timeout/connection/500) ``` ## Acceptance criteria - All errors carry `message`, optional `details: dict`, optional `original_reference: str` - HTTP error responses mapped to correct typed exceptions - `RegistryNetworkError` carries `status_code` and `url` - `__str__` includes original reference when available - Errors importable from `cleveractors.registry` ## Subtasks - [ ] Create `src/cleveractors/registry/exceptions.py` with full hierarchy - [ ] Implement `RegistryError` base with message, details, original_reference fields - [ ] Implement all 8 typed exceptions - [ ] Export from `src/cleveractors/registry/__init__.py` - [ ] Tests (Behave): features/registry_exceptions.feature — construction, HTTP mapping, str representation - [ ] Verify coverage >=97% via nox -s coverage_report - [ ] Run nox (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the first line matches the Commit Message in Metadata exactly. - The commit is pushed to the branch matching the Branch in Metadata exactly. - The commit is submitted as a PR to master, reviewed, and merged.
CoreRasurae added this to the v2.1.0 milestone 2026-06-05 17:34:42 +00:00
CoreRasurae changed title from Exception hierarchy — RegistryError base + all 8 error types to feat(registry): implement error hierarchy — RegistryError base + all 8 error types 2026-06-05 17:48:00 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveractors-core#29
No description provided.