Add custom RecordInvalid exception and raise in #save_entity!