Seaquel
PostgreSQL error code

PostgreSQL error 40P01

40P01 is the SQLSTATE PostgreSQL reports for deadlock detected, in class 40, Transaction Rollback.

SQLSTATE40P01
Condition namedeadlock_detected
Class40 — Transaction Rollback

Source: PostgreSQL documentation, Appendix A