Skip to content

[LOCKLITE-104] Refactor error handling#64

Merged
vbetsch merged 37 commits intodevelopfrom
refactor/104-error-handling
Aug 3, 2025
Merged

[LOCKLITE-104] Refactor error handling#64
vbetsch merged 37 commits intodevelopfrom
refactor/104-error-handling

Conversation

@vbetsch
Copy link
Owner

@vbetsch vbetsch commented Aug 3, 2025

No description provided.

vbetsch added 30 commits August 3, 2025 15:26
@vbetsch vbetsch requested a review from Copilot August 3, 2025 15:45
@vbetsch vbetsch self-assigned this Aug 3, 2025
@vbetsch vbetsch added the Code refactoring Code refactoring (for the release changelog) label Aug 3, 2025
@notion-workspace
Copy link

Refactor user story

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors error handling by consolidating error classes, restructuring error responses, and reorganizing file paths to improve maintainability and consistency across the codebase.

  • Consolidates error handling by moving HttpError to shared module and creating BusinessError for domain-specific errors
  • Restructures error response format to use nested object structure with message and optional code fields
  • Reorganizes file paths by moving types and props to more appropriate directories and updating import paths

Reviewed Changes

Copilot reviewed 33 out of 35 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/modules/shared/errors/http-error.ts New shared HttpError base class with status and toString method
src/modules/shared/errors/business-error.ts New BusinessError class extending HttpError with error codes
src/modules/api/helpers/api/handle-api-request.ts Updated error handling to support new error structure and nested response format
src/modules/ui/services/locklite-api-request.service.ts Refactored with improved error handling and method extraction
src/modules/shared/dto/output/errors/http.error.dto.ts Updated DTO to use nested error object structure
src/modules/api/usecases/vaults/create-vault.usecase.ts Added specific error handling for vault creation scenarios

@vbetsch vbetsch merged commit daf88b4 into develop Aug 3, 2025
4 checks passed
@vbetsch vbetsch deleted the refactor/104-error-handling branch August 3, 2025 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code refactoring Code refactoring (for the release changelog)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants