diff --git a/api/test.php b/api/test.php index 680c34c..864f638 100644 --- a/api/test.php +++ b/api/test.php @@ -28,4 +28,10 @@ // pre($USER); require_once __DIR__ . '/../inc/lib/CAPI.class.php'; $API = new CAPI(); - $API->$method(); \ No newline at end of file + try { + $API->$method(); + } catch (Throwable $e) { + CJson::create(['status' => 'fail', 'message' => 'Метод '.$method.' не найден']); + } + + \ No newline at end of file