pulp / pulp/pulpcore

"error" field of a Task is under-documented

Open
#1,882 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

API Bindings Issue
Dominant language
Python
Stars
598
Forks
168
Avg merge
1d 4h
Merged PRs (30d)
86

Description

Author: lieter (lieter)

Redmine Issue: 6502, https://pulp.plan.io/issues/6502


In the documentation, the "error" field of a returned Task is typed as an "object" (https://docs.pulpproject.org/restapi.html#operation/tasks_read). While true, it is rather unhelpful :).

Looking at the code, it is a python exception pulled through pulpcore/exceptions/base.py's exception_to_dict. This would mean that the object has 2 fields: "description" and "traceback". It would be great if the Error object ended up in the OpenAPI definition.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pulpcore/exceptions/base.py and its exception_to_dict function, then inspect the OpenAPI definition for the tasks_read operation in the REST API documentation. Confirm how the returned Task error is represented and document an Error object with the described fields. Done means the OpenAPI definition no longer types this field only as a generic object.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.