From 1a86bc54e6bf9f4089688c2b3544c11d17859a20 Mon Sep 17 00:00:00 2001
From: Guillaume Rousse <guillaume.rousse@renater.fr>
Date: Tue, 7 Nov 2017 15:24:53 +0100
Subject: [PATCH] consistent error types

---
 lib/IdPAccountManager/WebRequest.pm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/IdPAccountManager/WebRequest.pm b/lib/IdPAccountManager/WebRequest.pm
index 1383fce..0fcb99c 100755
--- a/lib/IdPAccountManager/WebRequest.pm
+++ b/lib/IdPAccountManager/WebRequest.pm
@@ -314,7 +314,7 @@ sub req_generate_token {
     }
 
     unless ($self->{in}->{email_address}) {
-        push @{ $self->{out}->{errors} }, "email_address";
+        push @{ $self->{out}->{errors} }, "missing_email_address";
         $self->{logger}->error("Missing parameter email_address");
         return undef;
     }
@@ -440,8 +440,7 @@ sub req_validate_token {
     }
 
     unless ($self->{in}->{authentication_token}) {
-        push @{ $self->{out}->{errors} },
-          "missing_authentication_token";
+        push @{ $self->{out}->{errors} }, "missing_authentication_token";
         $self->{logger}->error("Missing parameter authentication_token");
         return undef;
     }
-- 
GitLab