projects
/
pgeu-system.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbb1344
)
Write the body of a failed transferwise request to stderr
author
Magnus Hagander
<magnus@hagander.net>
Fri, 28 Feb 2025 13:21:00 +0000
(14:21 +0100)
committer
Magnus Hagander
<magnus@hagander.net>
Fri, 28 Feb 2025 13:21:55 +0000
(14:21 +0100)
postgresqleu/transferwise/api.py
patch
|
blob
|
blame
|
history
diff --git
a/postgresqleu/transferwise/api.py
b/postgresqleu/transferwise/api.py
index fa81ee2213570bb3e9639e78d650a98b175251c9..6bfdbb5bb67e12e67890c525a66a845d86fd073f 100644
(file)
--- a/
postgresqleu/transferwise/api.py
+++ b/
postgresqleu/transferwise/api.py
@@
-6,6
+6,7
@@
from datetime import datetime, timedelta
from decimal import Decimal
import json
import re
+import sys
import uuid
from base64 import b64encode
@@
-56,6
+57,8
@@
class TransferwiseApi(object):
},
)
if r.status_code != 200:
+ # Print the content of the error as well, so this can be picked up in a log
+ sys.stderr.write("API returned status {}. Body:\n{}".format(r.status_code, r.text[:2000]))
r.raise_for_status()
return r