Stanardize/Refactor error
As the repo size grows in volume it is important to standardize on the errors. We need to make sure that the shared/common errors are well-defined at one place and reused for different/appropriate use-cases. Currently the same error is being replicated across multiple places. For example the error for wrong syntax(ERR syntax error) is duplicated across at-least 9 places.
Please check here to see how Redis handles common messages.
Important: Please ensure we use idiomatic go practices while refactoring the code.
Expected behavior
The existing functionality shouldn't get effected and all test-cases should pass.
@soumya-codes would like to work on this.
@lucifercr07 thanks, go for this. @JyotinderSingh please assign.
Hey @lucifercr07 , may we collaborate on this issue?
@soumya-codes would like to work on this.
Assigned
@lucifercr07 -
This function creates a new DiceError but returns only its message field, losing the custom error type.
func NewErr(message string) error { return newDiceErr(message).message }
Why not use : func NewErr(message string) error { return newDiceErr(message) }