Skip to content

Commit 31eca80

Browse files
committed
Handle QBO returning null for code
1 parent 4737f87 commit 31eca80

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

quickbooks/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,10 @@ def handle_exceptions(results):
334334

335335
code = ""
336336
if "code" in error:
337-
code = int(error["code"])
337+
try:
338+
code = int(error["code"])
339+
except ValueError:
340+
code = 0
338341

339342
if 0 < code <= 499:
340343
raise exceptions.AuthorizationException(message, code, detail)

0 commit comments

Comments
 (0)