Skip to content

Commit cce8ff5

Browse files
committed
Don't attempt to get es doc in the Root controller
The parent class has a default action but dies because the Root controller has no 'type', so just skip the logic and go straight to 404. This fixes the previously added test.
1 parent 9f10ca3 commit cce8ff5

File tree

1 file changed

+7
-0
lines changed
  • lib/MetaCPAN/Server/Controller

1 file changed

+7
-0
lines changed

lib/MetaCPAN/Server/Controller/Root.pm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ sub default : Path {
1414
$c->forward('/not_found');
1515
}
1616

17+
# The parent class has a sub with this signature but expects a namespace
18+
# and an es type... since this controller doesn't have those, just overwrite.
19+
sub get : Path('') : Args(1) {
20+
my ( $self, $c ) = @_;
21+
$c->forward( '/not_found', [] );
22+
}
23+
1724
sub not_found : Private {
1825
my ( $self, $c, @params ) = @_;
1926
my $message = join( '/', @params );

0 commit comments

Comments
 (0)