Fix reporting of getMod errors

This commit is contained in:
Maxime Besson 2019-08-19 17:21:44 +02:00
parent 1360306b36
commit c718e806ed
2 changed files with 3 additions and 3 deletions

View File

@ -276,11 +276,11 @@ sub getMod {
my ( $self, $req ) = @_;
my ( $s, $m );
unless ( $s = $req->params('sessionType') ) {
$self->error('Session type is required');
$self->error($req->error('Session type is required'));
return ();
}
unless ( $m = $self->sessionTypes->{$s} ) {
$self->error('Unknown (or unconfigured) session type');
$self->error($req->error('Unknown (or unconfigured) session type'));
return ();
}
if ( my $kind = $req->params('kind') ) {

View File

@ -196,7 +196,7 @@ sub group {
}
## @method PSGI::Response sendError($req,$err,$code)
# Add user di to $err before calling Lemonldap::NG::Common::PSGI::sendError()
# Add user id to $err before calling Lemonldap::NG::Common::PSGI::sendError()
# @param $req Lemonldap::NG::Common::PSGI::Request
# @param $err String to push
# @code int HTTP error code (default to 500)