Closed deniszh closed 1 year ago
Recovered panic index out of range [1] with length 1 when we have fewer elements in absent results than normal results:
index out of range [1] with length 1
github.com/bookingcom/carbonapi/pkg/expr/types.MarshalJSON({0xc19c012c48, 0x3, 0x3?}) /usr/local/git_tree/gopath/src/github.com/bookingcom/carbonapi/pkg/expr/types/types.go:169 +0x4bd
Let's check array size beforehand
What issue is this change attempting to solve?
Recovered panic
index out of range [1] with length 1
when we have fewer elements in absent results than normal results:github.com/bookingcom/carbonapi/pkg/expr/types.MarshalJSON({0xc19c012c48, 0x3, 0x3?}) /usr/local/git_tree/gopath/src/github.com/bookingcom/carbonapi/pkg/expr/types/types.go:169 +0x4bd
How does this change solve the problem? Why is this the best approach?
Let's check array size beforehand