Project

Profile

Help

Issue #750

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

Added by amacdona@redhat.com over 6 years ago. Updated over 2 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.

Associated revisions

Revision cb26d892 View on GitHub
Added by ipanova@redhat.com over 6 years ago

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

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

Revision cb26d892 View on GitHub
Added by ipanova@redhat.com over 6 years ago

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

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

History

#1 Updated by dkliban@redhat.com over 6 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

#2 Updated by bmbouter over 6 years ago

  • Severity changed from Medium to 2. Medium

#3 Updated by amacdona@redhat.com over 6 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.

#4 Updated by ipanova@redhat.com over 6 years ago

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

#5 Updated by mhrivnak over 6 years ago

  • Platform Release deleted (2.7.0)

#6 Updated by ipanova@redhat.com over 6 years ago

  • Status changed from ASSIGNED to POST
  • Platform Release set to 2.7.1

#7 Updated by ipanova@redhat.com over 6 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

#8 Updated by ipanova@redhat.com over 6 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#9 Updated by amacdona@redhat.com almost 6 years ago

  • Platform Release changed from 2.7.1 to 2.7.2

#10 Updated by dkliban@redhat.com over 5 years ago

  • Status changed from MODIFIED to 5

#11 Updated by semyers over 5 years ago

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

#12 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF