Kuantaiuly Salamat
Kuantaiuly Salamat

Reputation: 1

Different error codes (23503 vs 23502) when deleting a row in PostgreSQL using asyncpg

I'm encountering an issue when deleting a row in PostgreSQL with foreign key relationships. Typically, this raises a ForeignKeyViolationError (23503), but when using asyncpg, I receive a NotNullViolationError (23502).

Why is this happening, and how should I handle such situations correctly?

Upvotes: 0

Views: 50

Answers (0)

Related Questions