Project

Profile

Help

Issue #756

closed

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

Added by amacdona@redhat.com over 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 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.

Actions #1

Updated by dkliban@redhat.com over 9 years ago

  • Severity set to Medium
  • Triaged changed from No to Yes
  • Platform Release set to 2.7.0
Actions #2

Updated by bmbouter over 9 years ago

  • Severity changed from Medium to 2. Medium

Added by Austin Macdonald over 9 years ago

Revision 089b0f0e | View on GitHub

django conversion - repositories

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

Added by Austin Macdonald over 9 years ago

Revision 089b0f0e | View on GitHub

django conversion - repositories

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

Actions #3

Updated by Anonymous over 9 years ago

  • Status changed from ASSIGNED to MODIFIED
  • % Done changed from 0 to 100
Actions #4

Updated by dkliban@redhat.com over 9 years ago

  • Status changed from MODIFIED to 5
Actions #5

Updated by pthomas@redhat.com over 9 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 ~]# 
Actions #6

Updated by amacdona@redhat.com about 9 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #8

Updated by Anonymous over 5 years ago

  • File screenshot_1_1553153124.png added
  • File screenshot_2_1553153131.png added
Actions #9

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added
Actions #10

Updated by Clayton372 about 5 years ago

  • File clipboard-201908291202-2qy5d.png added
Actions #11

Updated by ttereshc about 5 years ago

  • File deleted (screenshot_1_1553153124.png)
Actions #12

Updated by ttereshc about 5 years ago

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

Updated by ttereshc about 5 years ago

  • File deleted (screenshot_2_1553153131.png)

Also available in: Atom PDF