<commit_before>

package SRS::EPP::Command::Delete::Contact;

use Moose;
extends 'SRS::EPP::Command::Delete';
use MooseX::Method::Signatures;
use Crypt::Password;
use SRS::EPP::Session;
use XML::EPP::Contact;

# for plugin system to connect
sub xmlns {
    XML::EPP::Contact::Node::xmlns();
}

method process( SRS::EPP::Session $session ) {
    $self->session($session);
    my $epp = $self->message;
    my $message = $epp->message;

    my $payload = $message->argument->payload;
    my $action_id = $message->client_id || sprintf("auto.%x",time());

    return XML::SRS::Handle::Update->new(
            handle_id => $payload->id,
            action_id => $action_id,
            delete => 1,
            );
}

method notify( SRS::EPP::SRSResponse @rs ) {
  my $message = $rs[0]->message;
  my $response = $message->response;

  if ( ! $response ) {
    # That means everything worked
    return $self->make_response(code => 1000);
  }

  if ( $response->isa("XML::SRS::Error") ) {
    if ( $response->ErrorId() eq "HANDLE_DOES_NOT_EXIST" ) {
      return $self->make_response(code => 2303);
    }
  }
  return $self->make_response(code => 2400);
}

1;<commit_msg>This attribute has been changed, now error_id (not ErrorId)<commit_after>

package SRS::EPP::Command::Delete::Contact;

use Moose;
extends 'SRS::EPP::Command::Delete';
use MooseX::Method::Signatures;
use Crypt::Password;
use SRS::EPP::Session;
use XML::EPP::Contact;

# for plugin system to connect
sub xmlns {
    XML::EPP::Contact::Node::xmlns();
}

method process( SRS::EPP::Session $session ) {
    $self->session($session);
    my $epp = $self->message;
    my $message = $epp->message;

    my $payload = $message->argument->payload;
    my $action_id = $message->client_id || sprintf("auto.%x",time());

    return XML::SRS::Handle::Update->new(
            handle_id => $payload->id,
            action_id => $action_id,
            delete => 1,
            );
}

method notify( SRS::EPP::SRSResponse @rs ) {
  my $message = $rs[0]->message;
  my $response = $message->response;

  if ( ! $response ) {
    # That means everything worked
    return $self->make_response(code => 1000);
  }

  if ( $response->isa("XML::SRS::Error") ) {
    if ( $response->error_id() eq "HANDLE_DOES_NOT_EXIST" ) {
      return $self->make_response(code => 2303);
    }
  }
  return $self->make_response(code => 2400);
}

1;
{'fraction_non_alphanumeric': 0.17933641327173455, 'fraction_numerical': 0.0125997480050399, 'mean_word_length': 3.5895953757225434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '394428', 'n_tokens_mistral': 848, 'n_tokens_neox': 811, 'n_words': 169}