Skip to content

Return useful information to user from base task-actions #7270

@ggainey

Description

@ggainey

With #7065 we stopped returning potentially-sensitive info in failed task error-messages. We, alas, also lost information that the creators of those tasks need, in order to be able to figure out what happened.

As an example - general_create() validates the incoming serializer here https://github.com/pulp/pulpcore/blob/main/pulpcore/app/tasks/base.py#L41 . That used to tell the user exactly what the problem was. Now, all you get back is the generic "something went wrong" error.

We need to get the validation-error-msgs back to the user - things like "I expected JSON and didn't get it", "the URL you're syncing from isn't working", "I couldn't find the file you said to use", etc, are things the API-user should be able to see, not just the person who has access to the logs.

Whether we should be validating serializers in the tasks or in the viewset is a question for some other, later, day...

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions