Enhancement: Implement Uniform Error Handling in lib
Scripts
#16
Labels
↗️ medium priority
This issue is crucial
🐛 bug
Something isn't working
✨ enhancement
New feature or request
The lib scripts in the
src/lib
directory currently have inconsistent error handling practices. Some functions throws the erros correctly usingthrow
in thecatch
block of thetry...catch
, while some usesconsole.log
in catch blocks, and some others lacktry...catch
blocks altogether. To improve the maintainability and reliability of our codebase, we should implementtry...catch
blocks in all functions within the lib scripts and ensure that errors are thrown uniformly.Scope of Work:
try...catch
blocks in all functions within thesrc/lib
directory.throw
keyword in catch blocks.console.log
statements in catch blocks and replace them with appropriate error throwing.Additional Considerations:
Submission Guidelines:
src/lib
directory have propertry...catch
blocks implemented.Addition Information:
console.log
in thecatch
block of thetry..catch
; Its important to not remove theconsole.log
in thetry
blocks or anywhere else for now.logger
!? 😜 great thought, but we don't really want that yet (atleast at the time I write this issue), it might be an overkill... If anything changes, we will communicate this 👍The text was updated successfully, but these errors were encountered: