Skip to content

Commit

Permalink
Fix JSONDecoderError Import
Browse files Browse the repository at this point in the history
  • Loading branch information
Samueli924 committed Mar 29, 2024
1 parent 7a3c053 commit 95f1207
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,4 @@ chaoxing.log
./config.ini
./chaoxing.log
./cookies.txt
.idea/
6 changes: 5 additions & 1 deletion api/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
from loguru import logger
from requests.exceptions import JSONDecodeError
# from requests.exceptions import JSONDecodeError
from json import JSONDecodeError

class BaseException(Exception):
def __init__(self, _msg: str = None):
if _msg:
logger.error(_msg)


class LoginError(BaseException):
pass


class FormatError(Exception):
pass

0 comments on commit 95f1207

Please sign in to comment.