Description of problem: Task created for the import upload into a repo cannot handle properly exceptions. $ curl -H "Accept: application/json" -X GET -k -u admin:admin 'https://example.com/pulp/api/v2/tasks/5f8aa1f1-5d77-408b-8d6f-822afaa38cf5/'|python -m json.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1658 100 1658 0 0 1583 0 0:00:01 0:00:01 --:--:-- 1585 { "_href": "/pulp/api/v2/tasks/5f8aa1f1-5d77-408b-8d6f-822afaa38cf5/", "_id": { "$oid": "538d98df0c759879a2927ae1" }, "_ns": "task_status", "error": { "code": "PLP0000", "data": {}, "description": "Pulp exception occurred: PulpExecutionException", "sub_errors": [] }, "exception": null, "finish_time": "2014-06-03T09:43:59Z", "id": "538d98df591d260bedb7bbbd", "progress_report": {}, "queue": "reserved_resource_worker-0.dq", "result": null, "spawned_tasks": [], "start_time": "2014-06-03T09:43:59Z", "state": "error", "tags": [ "pulp:repository:isorepo", "pulp:action:import_upload" ], "task_id": "5f8aa1f1-5d77-408b-8d6f-822afaa38cf5", "task_type": "pulp.server.managers.content.upload.import_uploaded_unit", "traceback": "Traceback (most recent call last):\n File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 240, in trace_task\n R = retval = fun(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 321, in __call__\n return super(Task, self).__call__(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 437, in __protected_call__\n return self.run(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/managers/content/upload.py\", line 223, in import_uploaded_unit\n unit_metadata, file_path, conduit, call_config)\n File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/iso/importer.py\", line 120, in upload_unit\n iso = models.ISO(unit_key['name'], unit_key['size'], unit_key['checksum'])\nPulpExecutionException: Pulp exception occurred: PulpExecutionException\n" } $ curl -H "Accept: application/json" -X GET -k -u admin:admin 'https://example.com/pulp/api/v2/tasks/6a3b6aee-3636-4179-be96-f4a66975d669/'|python -m json.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1620 100 1620 0 0 1579 0 0:00:01 0:00:01 --:--:-- 1582 { "_href": "/pulp/api/v2/tasks/6a3b6aee-3636-4179-be96-f4a66975d669/", "_id": { "$oid": "538d99270c759879a2927ae3" }, "_ns": "task_status", "error": { "code": "PLP0000", "data": {}, "description": "Invalid unit type for repository", "sub_errors": [] }, "exception": null, "finish_time": "2014-06-03T09:45:11Z", "id": "538d9927591d260bedb7bbbe", "progress_report": {}, "queue": "reserved_resource_worker-0.dq", "result": null, "spawned_tasks": [], "start_time": "2014-06-03T09:45:11Z", "state": "error", "tags": [ "pulp:repository:rpmrepo", "pulp:action:import_upload" ], "task_id": "6a3b6aee-3636-4179-be96-f4a66975d669", "task_type": "pulp.server.managers.content.upload.import_uploaded_unit", "traceback": "Traceback (most recent call last):\n File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 240, in trace_task\n R = retval = fun(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 321, in __call__\n return super(Task, self).__call__(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 437, in __protected_call__\n return self.run(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/managers/content/upload.py\", line 195, in import_uploaded_unit\n ContentUploadManager.is_valid_upload(repo_id, unit_type_id)\n File \"/usr/lib/python2.7/site-packages/pulp/server/managers/content/upload.py\", line 164, in is_valid_upload\n raise PulpDataException('Invalid unit type for repository')\nPulpDataException: Invalid unit type for repository\n" } Version-Release number of selected component (if applicable): 2.4.0-0.19.beta How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: traceback and no http_status Expected results: http_status and no traceback Additional info:
What http status are you expecting? It appears that exceptions occurred because of invalid data being passed in. The information given in the error block shows the information about the exception. The state of the task is "error" as well. Is your concern that a traceback was included in the task details returned by the REST call?
I think it's my mistake, I got confused, sorry for the mess. I am closing it as NOTABUG