Better error handling when unable to save

Return an error with a descriptive message when unable to save due to primary key name mismatch.