mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
When the spotify crawler loop would import an artist multiple
times in parallel the first would succeed but the following queries
would throw with following exception:
QueryFailedError: duplicate key value violates unique constraint "IDX_ARTIST_SPOTIFY_ID"
This error also could happen for the album or track.
8 lines
226 B
TypeScript
8 lines
226 B
TypeScript
/**
|
|
* Offical postgres error codes to match against when checking database exceptions.
|
|
*
|
|
* https://www.postgresql.org/docs/current/errcodes-appendix.html
|
|
*/
|
|
export enum PostgresErrorCodes {
|
|
UNIQUE_VIOLATION = "23505",
|
|
}
|