build: Fix response text inclusion for connection errors
A requests Response object is only truthy when it's a successful error,
so we need to explicitely check if it's not None to get the error
message we want.
Bug: T354727
Related MRs:
- !48 (merged)
- !47 (merged) (This MR)
- main
Edited by Majavah