Skip to content

Improve error handling #1924

@PooyaRaki

Description

@PooyaRaki

Our current error handling implementation has room for improvement in providing clear and consistent error messages to the client. Enhancing this aspect will help in troubleshooting issues more effectively and improve overall user experience.

Objectives:
Review and Refactor Error Handling Logic: Assess the existing error handling mechanisms to identify areas where error processing and communication can be improved.
Testing and Validation: Add comprehensive tests to validate the new error handling behavior and confirm that the improvements address the current shortcomings.

Acceptance Criteria:

  • All error responses follow the standardized format.
  • The refactoring does not introduce breaking changes for existing clients.
  • Error messages are clear, actionable, and provide sufficient information for debugging.
    • Validation errors should return 4XX for client submitted data.
  • Tests cover a variety of error scenarios and confirm correct behavior.

Example
If an env. var. is not set, calling getOrThrow on the configuration service will thrown an unknown error that is otherwise hard to debug.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions