Skip to content

Refactored controller errors#76

Open
joeljoby02 wants to merge 1 commit into
mainfrom
controller-error
Open

Refactored controller errors#76
joeljoby02 wants to merge 1 commit into
mainfrom
controller-error

Conversation

@joeljoby02
Copy link
Copy Markdown
Collaborator

#Standardize Controller Error Creation based on issue #70

  • Added centralized createError(status, message, details) helper in utils.js
  • Replaced ad-hoc Object.assign() error construction with createError() in controller files
  • Updated error handling in crud, delete, release, overwrite, and search
  • Preserved existing error behavior and validated with route mounting tests

@allenbakki
Copy link
Copy Markdown
Collaborator

Looks good to me. The validation check for an empty JSON object is clear and prevents accidental broad queries, which is important. Also, pulling the error creation into a separate function is a solid approach. It keeps things cleaner and makes the error handling logic easier to maintain and reuse.

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.

2 participants