Re: [sqlalchemy] Suppress SQL statement in DBAPI Error Message?

2018-01-18 Thread Mike Bayer
On Thu, Jan 18, 2018 at 2:05 PM, Rick Suggs wrote: > Is there any way to suppress the SQL statement that is included in the DBAPI > error message? you can use the handle_error event:

[sqlalchemy] Suppress SQL statement in DBAPI Error Message?

2018-01-18 Thread Rick Suggs
Is there any way to suppress the SQL statement that is included in the DBAPI error message? For example: sqlalchemy.exc.DataError: (psycopg2.DataError) invalid input syntax for integer: "hello" LINE 1: INSERT INTO test (num, data) VALUES (100, 'hello');