Commit 415db52d authored by Xavier Guimard's avatar Xavier Guimard

Return 500 if init fails (#651)

parent 0af2bf4a
......@@ -304,7 +304,15 @@ sub loadModule {
sub fail {
$_[0]->lmLog( $_[0]->error, 'error' );
$_[0]->addUnauthRoute( '*' => 'displayError' );
$_[0]->addAuthRoute( '*' => 'displayError' );
return 0;
}
sub displayError {
my ( $self, $req ) = @_;
return $self->sendError( $req, 'Portal error, contact your administrator',
500 );
}
1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment