Be robust to lack of internet connection when reporting a crash (#558)
Be robust to lack of internet connection when reporting a crash (#558)

Fix the error handling: if err != nil, then 'res' might be nil,
causing a nil-pointer error in the error message formatting. Properly
handle err != nil and wrong HTTP status code in two separate steps.

Bug: b/169547718
Test: manual (force-crash replay while having internet disconnected)
google/agi,google/agi,google/agi,google/agi,google/agi,google/agi,google/agi,google/agi