deepkit / deepkit-framework

A new full-featured and high-performance TypeScript framework
https://deepkit.io/
MIT License
3.15k stars 118 forks source link

[orm] Postresql UniqueConstraintFailure | Doesn't always provide whole error context #547

Closed lionelhorn closed 5 months ago

lionelhorn commented 5 months ago

In case of a unique constraint violation, pgsql provides more infos than deepkit. This info is lost when UniqueConstraintFailure is thrown.

error from pg contains index violated and error.detail row infos

https://github.com/deepkit/deepkit-framework/blob/03b242832adac48b7163e1fcf8902e7f1b197e8a/packages/postgres/src/postgres-adapter.ts#L48-L54

marcj commented 5 months ago

Added in https://github.com/deepkit/deepkit-framework/commit/f1845ee84eb61a894155944a6efae6b926a4a47d