I get the SQLite error message \"FOREIGN KEY constraint failed\". That\'s the complete error information (besides a part of the SQL query) and it\'s not helpful. (In fact it
Due to the way in which deferred FK constraints are implemented in SQLite, this information is not available when the error is raised.
You could reimplement the FK checks as triggers. Alternatively, log the values in the failed command, and look up the data by hand.