"error" field of a Task is under-documented
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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