bug: index out of range when response code is not 200
Opened this issue · 0 comments
moleus commented
Program crashed with an error index out of range
on this line:
go-android-firebase/client/client.go
Line 63 in b7eff5a
My request payload was invalid and firebase API returned 40x
code and no err (it's the behavior of client.Do
). That's why we have to check resp.StatusCode
after err != nil
and return err
if status is not http.StatusOK
go-android-firebase/client/client.go
Lines 45 to 48 in b7eff5a