-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
empty rewards returns null #3705
Comments
It also crashes for empty validator rewards:
|
Yeah I remember making a comment about this during the distribution REST/CLI PR. It's fixable, we just need some custom result handling logic -- nothing major. |
@fedekunze Are there any other endpoints that exhibit this behavior? I would imagine yes. Ideally we fix all these in 1 PR. Also should it return a 404 instead of |
I think |
Return [] instead of null by making the initial value an empty slice literal opposed to nil. Closes: #3705
Summary of Bug
empty rewards from
GET distribution/delegators/{delegatorAddress}/rewards
should return[]
instead ofnull
For Admin Use
The text was updated successfully, but these errors were encountered: