Skip to content

Commit

Permalink
Resource not found should return HTTP status 404
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Carpenter committed Jul 10, 2014
1 parent e867b25 commit 4494b65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PHPMachine.php
Expand Up @@ -19,8 +19,8 @@ function execute_request(Request $request, Response $response, $dispatchPath) {
$result = Dispatcher::dispatch($dispatchList, $request);

if ($result[0]===false) {
$response->set_status_code(400);
$body = ErrorHandler::handleError(400, $request, 'Resource was not found');
$response->set_status_code(404);
$body = ErrorHandler::handleError(404, $request, 'Resource was not found');
$response->write($body);
return $response;
}
Expand Down

0 comments on commit 4494b65

Please sign in to comment.