Skip to content

Commit c53a3ea

Browse files
authored
Remove error code from NumberOfTransactionsExceededError (#561)
1 parent 7948ae0 commit c53a3ea

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Features
88
~~~~~~~~
99
- Handle error code ``-10735`` as ``ClientConnectionError``
1010
- Handle ``HANA Database instance resize in progress`` as ``DatabaseConnectNotPossibleError``
11+
- Remove error code restriction from ``NumberOfTransactionsExceededError``
1112

1213
4.3.0
1314
-----

sqlalchemy_hana/errors.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,7 @@ def convert_dbapi_error(dbapi_error: DBAPIError) -> DBAPIError:
192192
return WriteInReadOnlyReplicationError.from_dbapi_error(dbapi_error)
193193
if error.errorcode == 597:
194194
return SessionContextError.from_dbapi_error(dbapi_error)
195-
# 128 -> ERR_TX: Transaction error
196-
if (
197-
error.errorcode == 128
198-
and "exceed maximum number of transactions" in error.errortext
199-
):
195+
if "exceed maximum number of transactions" in error.errortext:
200196
return NumberOfTransactionsExceededError.from_dbapi_error(dbapi_error)
201197
# 149 -> ERR_TX_DIST_2PC_FAILURE
202198
if error.errorcode == 149:

0 commit comments

Comments
 (0)