US3524 handle empty responses

(Whitespace changes are in their own commit, for improved diff readability.)

This should help deal with [this error](https://wildfireapp.airbrake.io/errors/21018317) and others like it.