-
Notifications
You must be signed in to change notification settings - Fork 62
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
Make error a predefined variable for later comparision #24
Comments
@ptman error interface is generic. Just |
You misunderstand me. I suggest not using errors.New() but instead using constant errors, like in the article, that satisfy the error interface. Those can be compared. |
render/decoder.go
Line 30 in 3215478
If the returned error are defined var, it would be possible to compare and know what exactly happened. The error message from render package cannot be directly to client in most cases, but application developer would like to return some custom error.
would be helpful.
The text was updated successfully, but these errors were encountered: