Skip to content

Add Error Context Preservation to Simplified Error Handling #829

Open

Description

@marcuscastelo

Add Error Context Preservation to Simplified Error Handling

Description

The recent error handling refactor removed valuable context information from handleApiError calls. While this simplified the API, it may make debugging production issues more challenging. We need to restore essential context while maintaining the simplified interface.

Scope

  • src/shared/error/errorHandler.ts
  • All application layer modules that use handleApiError
  • Error handling patterns across the codebase

Motivation

  • Debugging production issues requires sufficient context
  • Current simplified calls lose operation and component information
  • Balance needed between simplicity and debugging capability
  • Maintain clean architecture while preserving error traceability

Acceptance Criteria

  • Create enhanced handleApiError function that preserves essential context
  • Update error handling to include operation and module information
  • Maintain backward compatibility with current simplified calls
  • Add TypeScript types for error context
  • Update at least 5 application modules to use enhanced error handling
  • Ensure error logging includes sufficient debugging information
  • Document new error handling patterns

Additional Context

Environment

  • App Version: v0.12.0-dev..5+issue.821
  • Type: Refactor
  • Priority: High
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backendBackend-specific issue or changecomplexity-highHigh implementation complexityideaNot yet decided as 'to be implemented'refactorCode refactoring requiredrefinementNeeds further refinement or polishtodo 🗒️

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions