diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 5ad7872..51588b6 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,8 +2,7 @@ - - + @@ -55,17 +54,7 @@ - - - - - - - - - - - + @@ -88,6 +77,16 @@ + + + + + + + + + + @@ -157,7 +156,6 @@ @@ -191,8 +190,8 @@ - @@ -308,6 +307,20 @@ - - + @@ -769,14 +782,6 @@ - - - - - - - - @@ -865,10 +870,10 @@ - + - - + + @@ -881,10 +886,18 @@ - + - - + + + + + + + + + + diff --git a/app/App.php b/app/App.php index 9cd296b..0a26a12 100644 --- a/app/App.php +++ b/app/App.php @@ -115,7 +115,6 @@ class App extends Application switch ($code) { case 405: - preg_match('/\(Allow\:(.+)\)/', $e->getMessage(), $matches); if(isset($matches[1])) { $matches = trim($matches[1]); @@ -128,7 +127,7 @@ class App extends Application //$message = 'Sorry bout that.
' . $e->getMessage(); break; default: - $message = $this['twig']->render('error500.html.twig'); + $message = json_encode(['status' => 'error', 'message' => $e->getMessage(), 'code' => $code]); } return new \Symfony\Component\HttpFoundation\Response($message, $code); });