Commit c5e87ca1 authored by Ad Schellevis's avatar Ad Schellevis

(mvc, api) error handling, set http status code

parent 65471b33
......@@ -28,6 +28,7 @@ try {
} catch (\Exception $e) {
$response = array();
$response['errorMessage'] = $e->getMessage();
header('HTTP', true, 500);
header("Content-Type: application/json;charset=utf-8");
echo json_encode($response, JSON_UNESCAPED_SLASHES);
error_log($e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment