pg-error-codes-ts
v1.0.1
Published
Postgres error codes for TypeScript
Downloads
503
Maintainers
Readme
pg-error-codes-ts
- pg-error-codes-ts is a enum of all error codes
Documentation
Usage
import {PG_ERROR} from 'pg-error-codes-ts/lib';
try {
await repo.findOne('wrong_id');
} catch (e) {
if (e.code == PG_ERROR.SOME_ERROR) // ... //
}