Skip to content

Commit

Permalink
removed: field on dataclass and added UnknownPartnerError
Browse files Browse the repository at this point in the history
  • Loading branch information
ChogirmaliYigit committed Nov 23, 2024
1 parent 9854adc commit 9e7e535
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 8 additions & 1 deletion payme/exceptions/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ def __init__(self, message="No receipts found for the given transaction ID.", da
super().__init__(message, data)


class UnknownPartnerError(BaseException):
"""The given partner ID is unknown."""
def __init__(self, message="Unknown partner or ID and Key not active", data=None):
super().__init__(message, data)


errors_map = {
-32300: TransportError,
-32700: ParseError,
Expand All @@ -255,5 +261,6 @@ def __init__(self, message="No receipts found for the given transaction ID.", da
-31102: OtpAttemptsExceededError,
-31103: OtpInvalidCodeError,
-31602: ReceiptsNotFoundError,
-32500: InvalidTokenFormat
-32500: InvalidTokenFormat,
-31601: UnknownPartnerError,
}
1 change: 0 additions & 1 deletion payme/types/response/receipts.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ class Receipt(Common):
type: int
external: bool
operation: int
category: any = None
error: any = None
description: str = None
detail: Detail = None
Expand Down

0 comments on commit 9e7e535

Please sign in to comment.