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
I mistyped a query for a getMany operation and the application had a 500 error. The 500 occurred because the database schema disallowed the malformed query to be run. In my case I was performing a filter for a boolean field, but in the query I provided I had added a ' to the end of my filter, so it became
-field||eq||false+field||eq||false'
Rather than having the operation have a 400 due to a malformed query, the CRUD module tried to run it and was stopped by the database schema.
It gave the following stacktrace (note the ' after false):
QueryFailedError: invalid input syntax for type boolean: "false'"
at new QueryFailedError (/usr/src/discoin/node_modules/typeorm/error/QueryFailedError.js:11:28)
at Query.callback (/usr/src/discoin/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:176:38)
at Query.handleError (/usr/src/discoin/node_modules/pg/lib/query.js:145:17)
at Connection.connectedErrorMessageHandler (/usr/src/discoin/node_modules/pg/lib/client.js:214:17)
at Connection.emit (events.js:210:5)
at Socket.<anonymous> (/usr/src/discoin/node_modules/pg/lib/connection.js:128:12)
at Socket.emit (events.js:210:5)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:290:11)
at Socket.Readable.push (_stream_readable.js:224:10)
The text was updated successfully, but these errors were encountered:
I mistyped a query for a
getMany
operation and the application had a 500 error. The 500 occurred because the database schema disallowed the malformed query to be run. In my case I was performing a filter for a boolean field, but in the query I provided I had added a'
to the end of my filter, so it becameRather than having the operation have a 400 due to a malformed query, the CRUD module tried to run it and was stopped by the database schema.
It gave the following stacktrace (note the
'
afterfalse
):The text was updated successfully, but these errors were encountered: