Removing errors package #315
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
The errors package is intended for defining code specific to each error. However, there are a few issues with this approach:
A more effective approach would be to define errors within their respective packages and ensure they are decoupled from one another.
The following packages will need to be updated to define errors locally:
Proposed Changes:
1- Define errors directly in each package where they are used.
2- Update error handling and tests in each package to refer to the errors defined locally rather than in
utils/errors
.3- Consider creating a
<package>/errors.go
file that exports any errors that need to be shared across multiple packages. But each package still owns its own errors.This change will make error handling cleaner and tests more self-contained by defining errors alongside the code that uses them. It removes unnecessary coupling between packages introduced by centralizing errors.
Once all errors have been converted, we can close this issue.
The text was updated successfully, but these errors were encountered: