rest: print also HTTP response reason in case of an error
This commit is contained in:
1 parent
7fe94a0493
commit
59b93f11e8
1 file changed
+1
-1
@@ -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