Skip to content

Commit 644fe38

Browse files
committed
Add tests for JSONDecodeError attrs
1 parent 7085af6 commit 644fe38

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import requests
2+
from requests.exceptions import JSONDecodeError
3+
4+
try:
5+
requests.get("https://httpbin.org/html")
6+
except JSONDecodeError as exc:
7+
print(f"Error. doc: {exc.doc}, msg: {exc.msg}, pos: {exc.pos}")

0 commit comments

Comments
 (0)