Skip to content

Commit

Permalink
Trap 404s and return Rest_Exception instead. Fixes ticket #1213.
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat committed Jul 16, 2010
1 parent 5fd1667 commit ed704e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/rest/controllers/rest.php
Expand Up @@ -87,6 +87,8 @@ public function __call($function, $args) {
// either need to map the result values to localized strings in the application code, or every
// client needs its own l10n string set.
throw new Rest_Exception("Bad Request", 400, $e->validation->errors());
} catch (Kohana_404_Exception $e) {
throw new Rest_Exception("Not Found", 404);
}
}
}

0 comments on commit ed704e6

Please sign in to comment.