Skip to content
Snippets Groups Projects
Commit aabfc388 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

kill errors email notification

parent 72bb6cc4
No related branches found
No related tags found
No related merge requests found
......@@ -175,37 +175,6 @@ sub respond {
$self->{logger}->errorf("Web parser error : %s", $tt2->error());
}
## Ignore some type of errors
my @errors_admin;
foreach my $id_error (@{ $self->{out}->{errors} }) {
unless ($id_error =~ /^(error_x)$/) {
push @errors_admin, $id_error;
}
}
## Mail notification of admins about the error
if (@errors_admin) {
eval {
IdPAccountManager::Tools::mail_notice(
template => 'mail/notification_generic_error.tt2.eml',
templates_dir => $self->{configuration}->{templates_dir},
data => {
env => {
REMOTE_HOST => $ENV{REMOTE_HOST},
REMOTE_ADDR => $ENV{REMOTE_ADDR},
},
conf => {
app_name => $self->{configuration}->{app_name},
app_url => $self->{configuration}->{app_url},
},
from => $self->{configuration}->{notice_from},
to => $self->{configuration}->{admin_email},
errors => $self->{out}->{errors}
}
);
};
$self->{logger}->errorf("Error TT2 : %s", $EVAL_ERROR) if $EVAL_ERROR;
}
}
## Return the list of known SPs first
......
......@@ -11,7 +11,6 @@ nobase_templates_DATA = \
accountProfiles/teacher1.tt2 \
accountProfiles/teacher2.tt2 \
accountProfiles/valid-accounts.php.tt2 \
mail/notification_generic_error.tt2.eml \
mail/send_authentication_token.tt2.eml \
web/account_wizard.tt2.html \
web/content.tt2.html \
......
From: [% app_name %] <[% from %]>
To: [% to %]
Subject: [% app_name %] - Error notification
Content-type: text/plain; charset=UTF-8; format=flowed
You receive this notification as administrator of the eduGAIN Test Account Manager
An error occured during test account processing.
[% IF error_type == 'skipping_provider_metadata_issue' %]
Le fichier de méta-données pour le provider [% entityid %] a un format incorrect ou n'a pas pu être téléchargé.
L'URL des méta-données : [% provider.get('metadataurl') %]
Check logs for more details
[% ELSE %]
Error: [% errors.join(',') %]
@IP : [% env.REMOTE_HOST %] / [% env.REMOTE_ADDR %]
Check logs for more details
[% END %]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment