Skip to content

Commit 36e13bd

Browse files
committed
feat: add SQL codes for PgUser (3D027, 42P020)
- Add SQL_STATE_INVALID_PG_USER (3D027) for invalid PG user errors - Add SQL_STATE_DUPLICATE_PG_USER (42P020) for duplicate PG user errors - Aligns with deltastreamv2 go-utils/errors/sqlcode.go
1 parent 9347851 commit 36e13bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/deltastream/api/error.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ class SqlState(str, Enum):
105105
SQL_STATE_3D024 = "3D024"
106106
SQL_STATE_3D025 = "3D025"
107107
SQL_STATE_3D026 = "3D026"
108+
SQL_STATE_3D027 = "3D027"
108109
SQL_STATE_42P09 = "42P09"
109110
SQL_STATE_42P10 = "42P010"
110111
SQL_STATE_42P11 = "42P011"
@@ -116,6 +117,7 @@ class SqlState(str, Enum):
116117
SQL_STATE_42P17 = "42P017"
117118
SQL_STATE_42P18 = "42P018"
118119
SQL_STATE_42P19 = "42P019"
120+
SQL_STATE_42P20 = "42P020"
119121

120122
# Class 00 — Successful Completion
121123
SQL_STATE_SUCCESSFUL_COMPLETION = SQL_STATE_00000
@@ -171,6 +173,7 @@ class SqlState(str, Enum):
171173
SQL_STATE_INVALID_USERDATA = SQL_STATE_3D024
172174
SQL_STATE_INVALID_DATAPLANE = SQL_STATE_3D025
173175
SQL_STATE_INVALID_PLAYBOOK = SQL_STATE_3D026
176+
SQL_STATE_INVALID_PG_USER = SQL_STATE_3D027
174177

175178
# Class 3E — Resource not ready
176179
SQL_STATE_STORE_NOT_READY = SQL_STATE_3E001
@@ -199,6 +202,7 @@ class SqlState(str, Enum):
199202
SQL_STATE_DUPLICATE_RELATION = SQL_STATE_42P17
200203
SQL_STATE_DUPLICATE_SCHEMA_REGISTRY = SQL_STATE_42P18
201204
SQL_STATE_DUPLICATE_COMPUTE_POOL = SQL_STATE_42P19
205+
SQL_STATE_DUPLICATE_PG_USER = SQL_STATE_42P20
202206
SQL_STATE_AMBIGUOUS_ORGANIZATION = SQL_STATE_42P001
203207
SQL_STATE_AMBIGUOUS_STORE = SQL_STATE_42P002
204208

0 commit comments

Comments
 (0)