mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
mvc: small update loosely related to #5061
This commit is contained in:
parent
1873189ac8
commit
9e7d8b2ddb
@ -24,7 +24,7 @@ try {
|
||||
$application = new \Phalcon\Mvc\Application($di);
|
||||
|
||||
echo $application->handle($_SERVER['REQUEST_URI'])->getContent();
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$response = array();
|
||||
$response['errorMessage'] = $e->getMessage();
|
||||
if (method_exists($e, 'getTitle')) {
|
||||
@ -36,7 +36,7 @@ try {
|
||||
header('HTTP', true, 500);
|
||||
header("Content-Type: application/json;charset=utf-8");
|
||||
echo json_encode($response, JSON_UNESCAPED_SLASHES);
|
||||
} catch (ArgumentCountError $e) {
|
||||
} catch (\ArgumentCountError $e) {
|
||||
error_log($e);
|
||||
$response = ['errorMessage' => 'endpoint parameter mismatch', 'errorTitle' => gettext("An API exception occured")];
|
||||
header('HTTP', true, 500);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user