summaryrefslogtreecommitdiff
path: root/modules/rest/controllers/rest.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-07-16 12:16:20 -0700
committerBharat Mediratta <bharat@menalto.com>2010-07-16 12:16:20 -0700
commited704e6a3bcd24c9d0ffbc4e71d2441aba4e9d0b (patch)
tree885dceb5d5fc0b128a8b167f474d959db688af71 /modules/rest/controllers/rest.php
parent5fd166724ba1dad3d6725d7bdb65627c0ae9ed91 (diff)
Trap 404s and return Rest_Exception instead. Fixes ticket #1213.
Diffstat (limited to 'modules/rest/controllers/rest.php')
-rw-r--r--modules/rest/controllers/rest.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/rest/controllers/rest.php b/modules/rest/controllers/rest.php
index f8a46515..293252ef 100644
--- a/modules/rest/controllers/rest.php
+++ b/modules/rest/controllers/rest.php
@@ -87,6 +87,8 @@ class Rest_Controller extends Controller {
// 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);
}
}
} \ No newline at end of file