Project

Profile

Help

Issue #750

closed

Call to remove a nonexisting importer results in a misleading 404 (missing repo)

Added by amacdona@redhat.com about 9 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.7.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description
A call to remove a nonexisting importer correctly returns a 404, however the information is misleading. In this case the repo exists, the importer does not, however it suggests that the repo does not exist and makes no mention about the importer.

Actual Results

$ curl -s -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X DELETE -k -u admin:admin https://localhost/pulp/api/v2/repositories/test/importers/fake/ | python -mjson.tool

{
    "_href": "/pulp/api/v2/repositories/test/importers/fake/",
    "error": {
        "code": "PLP0009",
        "data": {
            "resources": {
                "repository": "test"
            }
        },
        "description": "Missing resource(s): repository=test",
        "sub_errors": []
    },
    "error_message": "Missing resource(s): repository=test",
    "exception": null,
    "http_request_method": "DELETE",
    "http_status": 404,
    "resources": {
        "repository": "test"
    },
    "traceback": null
}

Expected Results

$ curl -s -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X DELETE -k -u admin:admin https://localhost/pulp/api/v2/repositories/test/importers/fake/ | python -mjson.tool

{
    "_href": "/pulp/api/v2/repositories/test/importers/fake/",
    "error": {
        "code": "PLP0009",
        "data": {
            "resources": {
                "repository": "test"
            }
        },
        "description": "Missing resource(s): importer_id=fake",
        "sub_errors": []
    },
    "error_message": "Missing resource(s): importer_id=fake",
    "exception": null,
    "http_request_method": "DELETE",
    "http_status": 404,
    "resources": {
        "repository": "test"
    },
    "traceback": null
}

Note
This problem occurs in the manager so it will not be fixed by the django work.

Actions #1

Updated by dkliban@redhat.com about 9 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to amacdona@redhat.com
  • Severity set to Medium
  • Triaged changed from No to Yes
  • Platform Release set to 2.7.0
Actions #2

Updated by bmbouter about 9 years ago

  • Severity changed from Medium to 2. Medium
Actions #3

Updated by amacdona@redhat.com about 9 years ago

  • Status changed from ASSIGNED to NEW
  • Assignee deleted (amacdona@redhat.com)

This was mistakenly assigned to me. This will not be fixed by the django conversion.

Actions #4

Updated by ipanova@redhat.com almost 9 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ipanova@redhat.com
Actions #5

Updated by mhrivnak almost 9 years ago

  • Platform Release deleted (2.7.0)
Actions #6

Updated by ipanova@redhat.com almost 9 years ago

  • Status changed from ASSIGNED to POST
  • Platform Release set to 2.7.1
Actions #7

Updated by ipanova@redhat.com almost 9 years ago

Please, during verification of this bug also check:
- delete/get/update invalid importer_id when repo has no importers,
- delete/get/update invalid importer_id when repo has different importer from the provided one

Added by ipanova@redhat.com almost 9 years ago

Revision cb26d892 | View on GitHub

Fixing get, update, delete call when non existent importer is provided.

closes #750 https://pulp.plan.io/issues/750

Added by ipanova@redhat.com almost 9 years ago

Revision cb26d892 | View on GitHub

Fixing get, update, delete call when non existent importer is provided.

closes #750 https://pulp.plan.io/issues/750

Actions #8

Updated by ipanova@redhat.com almost 9 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #9

Updated by amacdona@redhat.com over 8 years ago

  • Platform Release changed from 2.7.1 to 2.7.2
Actions #10

Updated by dkliban@redhat.com about 8 years ago

  • Status changed from MODIFIED to 5
Actions #11

Updated by semyers almost 8 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
  • Platform Release changed from 2.7.2 to 2.7.0
Actions #12

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF