当我的应用程序崩溃时,nestjs处理了一个异常,但我无法获得真正的问题文件
异常堆栈:
[Nest] 17946 - 4/18/2018, 5:00:56 PM [ExceptionsHandler] duplicate key value violates unique constraint "uk_app_name"
QueryFailedError: duplicate key value violates unique constraint "uk_app_name"
at new QueryFailedError (.../src/error/QueryFailedError.ts:7:9)
at Query.<anonymous> (.../src/driver/postgres/PostgresQueryRunner.ts:216:26)
at Query.handleError (.../node_modules/pg/lib/query.js:143:17)
at Connection.connectedErrorHandler (.../node_modules/pg/lib/client.js:132:26)
at Connection.emit (events.js:180:13)
at Connection.emit (domain.js:422:20)
at Socket.<anonymous> (.../node_modules/pg/lib/connection.js:117:12)
at Socket.emit (events.js:180:13)
at Socket.emit (domain.js:422:20)
at addChunk (_stream_readable.js:274:12)
...
是我的工作目录
我如何知道哪个文件来自
答案 0 :(得分:0)
PostgresQueryRunner.js
引发了异常,而不是您的代码库。
您的应用尝试在PgSQL数据库中的索引为unique
的表列中插入重复值。