public function addTaskAction(Request $request)
    {
        $metaData = null;
        $content  = $request->getContent();
        if (empty($content)) {
            throw new NotAcceptableHttpException('Invalid payload');
        }
        $metaData = new JsonArray($content);
        if (!$metaData->has('type')) {
            throw new NotAcceptableHttpException('Invalid payload');
        }

        try {
            $taskId = $this->getTensideTasks()->queue($metaData->get('type'), $metaData);
        } catch (\InvalidArgumentException $exception) {
            throw new NotAcceptableHttpException($exception->getMessage());
        }

        return $this->createJsonResponse(
            [$this->convertTaskToArray($this->getTensideTasks()->getTask($taskId))],
            false,
            'OK',
            JsonResponse::HTTP_CREATED
        );
    }