protected function createResponseFromException(\Exception $e, JsonRequest $request)
    {
        $response = new JsonResponse();
        $response->setId($request->getId());

        $response->setErrorMessage($e->getMessage());
        $response->setErrorCode($e->getCode());

        return $response;
    }