Skip to content

Standardize error handling with function-based helpers and unified API responses (T415715)#83

Open
AdeelTahir-SE wants to merge 2 commits intoindictechcom:masterfrom
AdeelTahir-SE:exception_heirarchy
Open

Standardize error handling with function-based helpers and unified API responses (T415715)#83
AdeelTahir-SE wants to merge 2 commits intoindictechcom:masterfrom
AdeelTahir-SE:exception_heirarchy

Conversation

@AdeelTahir-SE
Copy link
Copy Markdown

PR improves backend reliability and consistency by replacing inconsistent error returns with reusable function-based error helpers. It introduces a unified response pattern for success/failure paths, removes None-style failure signaling in key flows, and makes error handling easier to trace and maintain.

What Changed:

  1. Added function-based error helpers (e.g., download_error(),file_handling_error(), upload_error(), validation_error().
  2. Added unified response helpers for API responses success_response,error_response,error_response_from_error
  3. Added operation result helpers for internal functions operation_success, operation_failure to replace None failure returns.
  4. Refactored upload-related backend flow to consume standardized operation results instead of inconsistent checks.
  5. Updated utility and async task upload flows to return structured failure objects using named error functions.
  6. Kept logging integrated in failure/success paths to improve observability and debugging.

…nce upload validation,

Refactor logging and error handling: replace loggings module with logger,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant