Skip to content

Commit

Permalink
MicroPresenter: returns 500 instead of 404 when parameter callback is…
Browse files Browse the repository at this point in the history
… missing
  • Loading branch information
dg committed Feb 2, 2017
1 parent 7dff3e2 commit b7df270
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Application/MicroPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function run(Application\Request $request): Application\IResponse

$params = $request->getParameters();
if (!isset($params['callback'])) {
throw new Application\BadRequestException('Parameter callback is missing.');
throw new Nette\InvalidStateException('Parameter callback is missing.');
}
$callback = $params['callback'];
$reflection = Nette\Utils\Callback::toReflection(Nette\Utils\Callback::check($callback));
Expand Down

0 comments on commit b7df270

Please sign in to comment.