Project

Profile

Help

Issue #756

Api call to get a scheduled sync or publish with invalid schedule_id returns 400

Added by amacdona@redhat.com over 6 years ago. Updated almost 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 GET request to /v2/repositories/<repo_id>/importers/<importer_id>/schedules/sync/<schedule_id>/ returns a 400 if schedule_id is not a valid bson ObjectId.

Since this information is passed in the url, it should instead be a 404.

To reproduce
The schedule id must not be a bson ObjectId.

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

{
    "_href": "/pulp/api/v2/repositories/test/importers/yum_importer/schedules/sync/not_valid_bson_object_id/",
    "error": {
        "code": "PLP0015",
        "data": {
            "properties": "['schedule_ids']",
            "property_names": [
                "schedule_ids"
            ]
        },
        "description": "Invalid properties: ['schedule_ids']",
        "sub_errors": []
    },
    "error_message": "Invalid properties: ['schedule_ids']",
    "exception": null,
    "http_request_method": "GET",
    "http_status": 400,
    "property_names": [
        "schedule_ids"
    ],
    "traceback": null
}

Note
This will be fixed in the Django conversion.

Associated revisions

Revision 089b0f0e View on GitHub
Added by Austin Macdonald over 6 years ago

django conversion - repositories

closes #707 closes #749 closes #756 closes #804 closes #805 closes #812

Revision 089b0f0e View on GitHub
Added by Austin Macdonald over 6 years ago

django conversion - repositories

closes #707 closes #749 closes #756 closes #804 closes #805 closes #812

History

#1 Updated by dkliban@redhat.com over 6 years ago

  • 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 Anonymous over 6 years ago

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

#4 Updated by dkliban@redhat.com about 6 years ago

  • Status changed from MODIFIED to 5

#5 Updated by pthomas@redhat.com about 6 years ago

  • Status changed from 5 to 6

verified

[root@qe-blade-10 ~]# rpm -qa pulp-server
pulp-server-2.7.0-0.3.beta.el6.noarch
[root@qe-blade-10 ~]# 
[root@qe-blade-10 ~]# curl -s -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin https://localhost/pulp/api/v2/repositories/zoo/importers/yum_importer/schedules/sync/not_valid_bson_object_id/  | python -mjson.tool
{
    "_href": "/pulp/api/v2/repositories/zoo/importers/yum_importer/schedules/sync/not_valid_bson_object_id/", 
    "error": {
        "code": "PLP0009", 
        "data": {
            "resources": {
                "schedule_id": "not_valid_bson_object_id"
            }
        }, 
        "description": "Missing resource(s): schedule_id=not_valid_bson_object_id", 
        "sub_errors": []
    }, 
    "error_message": "Missing resource(s): schedule_id=not_valid_bson_object_id", 
    "exception": null, 
    "http_request_method": "GET", 
    "http_status": 404, 
    "resources": {
        "schedule_id": "not_valid_bson_object_id"
    }, 
    "traceback": null
}
[root@qe-blade-10 ~]# 

#6 Updated by amacdona@redhat.com over 5 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#8 Updated by Anonymous over 2 years ago

  • File screenshot_1_1553153124.png added
  • File screenshot_2_1553153131.png added

#9 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

#10 Updated by Clayton372 almost 2 years ago

  • File clipboard-201908291202-2qy5d.png added

#11 Updated by ttereshc almost 2 years ago

  • File deleted (screenshot_1_1553153124.png)

#12 Updated by ttereshc almost 2 years ago

  • File deleted (clipboard-201908291202-2qy5d.png)

#13 Updated by ttereshc almost 2 years ago

  • File deleted (screenshot_2_1553153131.png)

Please register to edit this issue

Also available in: Atom PDF