You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an error is rejected from a query, then the stack trace is not complete. It does not include the calling code and that makes finding and fixing the errors harder than it needs to be. Could we not improve this in the module instead of having users add some wrapping try-catch logic to try to improve this?
**Sample of and error I just got"
error: operator does not exist: text = integer
at Parser.parseErrorMessage (/Users/aegiro/code/project/node_modules/pg-protocol/src/parser.ts:369:69)
at Parser.handlePacket (/Users/aegiro/code/project/node_modules/pg-protocol/src/parser.ts:188:21)
at Parser.parse (/Users/aegiro/code/project/node_modules/pg-protocol/src/parser.ts:103:30)
at Socket.<anonymous> (/Users/aegiro/code/project/node_modules/pg-protocol/src/index.ts:7:48)
at Socket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:290:12)
at readableAddChunk (internal/streams/readable.js:265:9)
at Socket.Readable.push (internal/streams/readable.js:204:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
length: 200,
severity: 'ERROR',
code: '42883',
detail: undefined,
hint: 'No operator matches the given name and argument types. You might need to add explicit type casts.',
position: '295',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_oper.c',
line: '731',
routine: 'op_error'
}
The text was updated successfully, but these errors were encountered:
We've also encountered this. This is something that the node.js ecosystem really suffers from, and node.js does not make it easy for library writers in a lot of places.
However, I think this really deserves focus. This is a library that a lot of other libraries depend on, which means that in a lot of cases a DB query error is really hard to debug.
When an error is rejected from a query, then the stack trace is not complete. It does not include the calling code and that makes finding and fixing the errors harder than it needs to be. Could we not improve this in the module instead of having users add some wrapping try-catch logic to try to improve this?
**Sample of and error I just got"
The text was updated successfully, but these errors were encountered: