Set an error code if project was not inserted successfully.