Updated exception handling in http service presenter - fixed hardcoded error code
This commit is contained in:
@@ -94,7 +94,7 @@ abstract class HttpServicePresenter extends Presenter
|
|||||||
{
|
{
|
||||||
$this->response->setCode(IResponse::S500_INTERNAL_SERVER_ERROR);
|
$this->response->setCode(IResponse::S500_INTERNAL_SERVER_ERROR);
|
||||||
$this->sendResponse(new JsonResponse(['fault' => [
|
$this->sendResponse(new JsonResponse(['fault' => [
|
||||||
'faultcode' => 500,
|
'faultcode' => $code,
|
||||||
'faultstring' => $exception->getMessage(),
|
'faultstring' => $exception->getMessage(),
|
||||||
'detail' => get_class($exception) . ": " . $exception->getMessage()
|
'detail' => get_class($exception) . ": " . $exception->getMessage()
|
||||||
]]));
|
]]));
|
||||||
|
|||||||
Reference in New Issue
Block a user