Improve error messages when data can't be saved.