-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DiceDB should not return golang errors to users #1104
Comments
Hi @JyotinderSingh would love to pick this up. |
Hey @JyotinderSingh i would love to resolve this issue |
Assigned. |
@JyotinderSingh Please assign me some issue to work on . I want to contribute . |
Hi @JyotinderSingh , Just to make sure I understand this correctly, follwing is a code snippet from the if err := object.AssertType(obj.TypeEncoding, object.ObjTypeByteList); err != nil {
return clientio.Encode(err, false)
}
if err := object.AssertEncoding(obj.TypeEncoding, object.ObjEncodingDeque); err != nil {
return clientio.Encode(err, false)
} |
Not exactly, the assertType method internally returns a custom error - which is okay. We are looking to fix instances where we may be seeing golang throw an error and returning the same error back to the user. For instance, say somewhere we try to convert a random string to a number using the ParseFloat API and the operation fails, we should return golang's error message but rather our own (ideally similar to what redis returns) |
|
We return golang errors to users in some of the error paths in our code, largely in functions defined inside
eval.go
.This is undesirable. We should only be returning custom error messages that are designed by us to the users, instead of exposing the underlying language details.
As a part of this issue, you will need to identify places where we might be returning language specific errors to the users, and replace them with custom dicedb error messages.
The text was updated successfully, but these errors were encountered: