Skip to content

[Task] docs: Create unified error code registry document #331

Description

@kcenon

Summary

Create a unified error code registry document that catalogs all error code ranges across the ecosystem, verifies no overlaps, and provides a lookup reference.

Parent Issue

Part of: [EPIC] docs: Address documentation gaps across all ecosystem systems (#325)

Background (Why)

The kcenon ecosystem uses a decentralized error code registry where each system is allocated a range:

  • common_system: -1 to -99
  • thread_system: -100 to -199
  • logger_system: -200 to -299
  • container_system: -300 to -399
  • monitoring_system: -400 to -499
  • database_system: -500 to -599
  • network_system: -600 to -699

However, there is no centralized document verifying:

  • Actual error codes defined in each system
  • Whether any codes overlap between systems
  • What each specific error code means
  • How to handle cross-system error propagation

Scope (What)

Create docs/ERROR_CODES.md covering:

1. Error Code Range Allocation

System Range Allocated Used Available
common_system -1 to -99 99 ? ?
thread_system -100 to -199 100 ? ?
logger_system -200 to -299 100 ? ?
container_system -300 to -399 100 ? ?
monitoring_system -400 to -499 100 ? ?
database_system -500 to -599 100 ? ?
network_system -600 to -699 100 ? ?

2. Per-System Error Code Catalog

For each system, list every defined error code:

-1: UNKNOWN_ERROR — General unknown error
-2: INVALID_ARGUMENT — Invalid function argument
...

3. Error Code Lookup

  • How to look up error code meaning programmatically
  • Error code to string conversion API
  • Logging error codes with context

4. Cross-System Error Handling

  • How errors propagate across system boundaries
  • Error wrapping and context addition
  • Best practices for multi-system error handling

5. Error Code Verification

  • Script or test to verify no overlapping codes
  • CI integration for error code uniqueness

Acceptance Criteria

  • All error code ranges documented
  • Actual used codes enumerated per system
  • No overlapping codes verified
  • Cross-system error handling patterns documented
  • Verification script or test provided

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationpriority:mediumMedium priority issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions