mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-14 16:50:17 +02:00
rest: print also HTTP response reason in case of an error
This commit is contained in:
@@ -84,7 +84,7 @@ class RESTTest (BitcoinTestFramework):
|
||||
conn.request('POST', rest_uri, body)
|
||||
resp = conn.getresponse()
|
||||
|
||||
assert resp.status == status, f"Expected: {status}, Got: {resp.status} - Response: {str(resp.read())}"
|
||||
assert resp.status == status, f"Expected: {status}, Got: {resp.status} ({resp.reason}) - Response: {str(resp.read())}"
|
||||
|
||||
if ret_type == RetType.OBJ:
|
||||
return resp
|
||||
|
||||
Reference in New Issue
Block a user