- if new.version != old.version
- raise OSM::APIVersionMismatchError.new(new.id, new.class.to_s, new.version, old.version)
+ if new.id != old.id || new.id.nil? || old.id.nil?
+ fail OSM::APIPreconditionFailedError.new("New and old IDs don't match on #{new.class}. #{new.id} != #{old.id}.")
+ elsif new.version != old.version
+ fail OSM::APIVersionMismatchError.new(new.id, new.class.to_s, new.version, old.version)