Project

Profile

Help

Story #219

closed

List the invalid value in InvalidValue exceptions

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

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

++ This bug was initially created as a clone of Bugzilla Bug #1058927 ++

Description of problem:

I spent a few hours today trying to debug this error from pulp:

{"http_request_method": "POST", "exception": null, "error_message": "Invalid properties: ['distributor_type_id']", "property_names": ["distributor_type_id"], "_href": "/pulp/api/v2/repositories/", "http_status": 400, "traceback": null}

The acutal issue was that I was passing in a request to create a new disributor with the following json:

/pulp/api/v2/repositories/
post
{"id":"DemoOrg-wordpress-r6","display_name":"r6","importer_type_id":"yum_importer","importer_config":{"ssl_ca_cert":null,"ssl_client_cert":null,"ssl_client_key":null,"feed":"http://10.13.137.92/lab/wordpress/el6/x86_64/"},"notes":{"_repo-type":"rpm-repo"},"distributors":[{"distributor_type":"yum_distributor","distributor_config":{"relative_url":"DemoOrg/Library/custom/wordpress/r6","http":true,"https":true,"protected":true},"auto_publish":true,"distributor_id":"DemoOrg-wordpress-r6"},{"distributor_type":"yum_clone_distributor","distributor_config":{"destination_distributor_id":"DemoOrg-wordpress-r6"},"auto_publish":false,"distributor_id":"DemoOrg-wordpress-r6_clone"},{"distributor_type":"nodes_http_distributor","distributor_config":{},"auto_publish":true,"distributor_id":"DemoOrg-wordpress-r6_nodes"}\]}
{"content_type"=>"application/json", "accept"=>"application/json", "Authorization"=>"OAuth oauth_body_hash=\"2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D\", oauth_consumer_key=\"katello\", oauth_nonce=\"Vq0XTFThBe6ggweXskL10MfVxAFDHQIOCIMbRHUc0\", oauth_signature=\"GvyE8aXP%2B0GLc4EyuHkrQjTUIDQ%3D\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1390932025\", oauth_version=\"1.0\"", "pulp-user"=>"admin"}

The error message is bad for two reasons:

1) The parameter it specifies (distributor_type_id) is not in the json.
2) I have no idea what the actual invalid piece of data was

It was failing on the fact that I did not have pulp-nodes-parent installed and I passed in "distributor_type":"nodes_http_distributor". It would have been much easier to have seen the invalid data as well to help me on my debugging. If I had seen a message which was:

{"http_request_method": "POST", "exception": null, "error_message": "Invalid properties: ['distributor_type_id'] values: ['nodes_http_distributor']", "property_names": ["distributor_type_id"], "_href": "/pulp/api/v2/repositories/", "http_status": 400, "traceback": null}

It would have been much nicer.

Actions #1

Updated by amacdona@redhat.com over 7 years ago

  • Subject changed from [RFE] List the invalid value in InvalidValue exceptions to List the invalid value in InvalidValue exceptions
Actions #2

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #3

Updated by bmbouter about 5 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #4

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF