mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-19 19:09:13 -04:00
Trap 404s and return Rest_Exception instead. Fixes ticket #1213.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user