Skip to content

Conversation

@mattcoulter7
Copy link
Member

No description provided.

MySQL/MariaDB: maps by errno; deadlocks (1213) and lock timeouts (1205) → 503; duplicate key (1062) → 409; data too long (1406) → 400.

SQLite: inspects well-known message substrings; unique/FK/not-null/check mapped accordingly; “database is locked” → 503.

SQL Server (pyodbc): parses first args element as error code; deadlock (1205) → 503; unique violations (2601/2627) → 409; truncation (2628) → 400; permission (229) → 403.

Oracle: extracts ORA-xxxxx code from .code, .message, or args; unique (00001) → 409; FK (02291/02292) → 409; not null (01400) → 422; check (02290) → 422; deadlock (00060) → 503; truncation (12899) → 400.
@mattcoulter7 mattcoulter7 merged commit 42ebfa1 into main Nov 2, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants