pulp_rpm icon indicating copy to clipboard operation
pulp_rpm copied to clipboard

Minor error in error-message when validating incoming Content:Advisory CREATE

Open ggainey opened this issue 3 years ago • 2 comments

Version pulp_rpm/3.18.0.dev

Describe the bug If you don't pass a file into the CREATE API, the error message suggests file-or-artifact required. Advisory/UpdateRecord is non-Artifact content/

See app/serializers/advisory.py#L206

To Reproduce Steps to reproduce the behavior:

$ http --form POST :/pulp/api/v3/content/rpm/advisories/
HTTP/1.1 400 Bad Request
{
    "non_field_errors": [
        "Only creation with file or artifact is allowed."
    ]
}

Expected behavior

{
    "non_field_errors": [
        "File parameter required."
    ]
}

ggainey avatar May 17 '22 16:05 ggainey

@pavelpicka Is this RBAC related?

dralley avatar May 17 '22 19:05 dralley

@pavelpicka Is this RBAC related?

No, the RBAC-related one is #2534 - this is one is just the error-msg mentioning "or artifact", when UpdateRecord isn't artifact-backed.

ggainey avatar May 17 '22 19:05 ggainey