Skip to content

Commit 8cd9aa7

Browse files
SP-582 Python - Implement better refund exceptions - fix test
1 parent 77388d6 commit 8cd9aa7

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/bitpay/clients/response_parser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def response_to_json_string(response: Response) -> Any:
2929
BitPayExceptionProvider.throw_api_exception_with_message(
3030
response_obj["error"], response_obj["code"]
3131
)
32+
if "data" in response_obj and len(response_obj["data"]) == 0:
33+
return response_obj
3234

3335
if "error" in response_obj:
3436
BitPayExceptionProvider.throw_api_exception_with_message(

tests/unit/json/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)