forked from mirrors/easyappointments
Added new method for returning common 404 exceptions.
This commit is contained in:
parent
f999716969
commit
ba4aa48e47
1 changed files with 9 additions and 0 deletions
|
@ -81,6 +81,15 @@ class API_V1_Controller extends CI_Controller {
|
||||||
|
|
||||||
echo json_encode($error, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);
|
echo json_encode($error, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Throw an API exception stating that the requested record was not found.
|
||||||
|
*
|
||||||
|
* @throws \EA\Engine\Api\V1\Exception
|
||||||
|
*/
|
||||||
|
protected function _throwRecordNotFound() {
|
||||||
|
throw new \EA\Engine\Api\V1\Exception('The requested record was not found!', 404, 'Not Found');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End of file API_V1_Controller.php */
|
/* End of file API_V1_Controller.php */
|
||||||
|
|
Loading…
Reference in a new issue