expose permission exceptions to the API
This commit is contained in:
@@ -196,6 +196,7 @@ class Controller
|
|||||||
*/
|
*/
|
||||||
private function _create()
|
private function _create()
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
// Ensure last paste from visitors IP address was more than configured amount of seconds ago.
|
// Ensure last paste from visitors IP address was more than configured amount of seconds ago.
|
||||||
TrafficLimiter::setConfiguration($this->_conf);
|
TrafficLimiter::setConfiguration($this->_conf);
|
||||||
if (!TrafficLimiter::canPass()) {
|
if (!TrafficLimiter::canPass()) {
|
||||||
@@ -207,6 +208,10 @@ class Controller
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$this->_return_message(1, I18n::_($e->getMessage()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$data = $this->_request->getData();
|
$data = $this->_request->getData();
|
||||||
$isComment = array_key_exists('pasteid', $data) &&
|
$isComment = array_key_exists('pasteid', $data) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user