pulp / pulp/pulpcore

TaskResponse error field additionalProperties is the wrong type

Open
#4,194 0 comments 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

Version
Pulpcore 3.29.2
RPM 3.22.2
Certguard 1.6.5

Installed with podman compose

Describe the bug
The error field in TaskResponse is defined as the type "object" with the "additionalProperties" type object. However, it looks like the returned value is actually the type "object" with the properties of the objects being strings.

"error": {
    "traceback": "  File \"/...",
    "description": "Cannot connect..."
  },

Traceback and Description are values of type string.

My understanding of this comes from this documentation here, which says additionalProperties specifies the types of the values.
To Reproduce
Sync a repository with a bad URL and observe the error in the TaskResponse. There are two fields, traceback and description, with values of type string. However, if you query the docs it says the type is object.

Expected behavior
I would expect the api.json to define the additionalProperties as type string instead of type object

Additional context
This is causing some issues in our generated library here that we've worked around manually here: https://github.com/content-services/zest/commit/ee55f31f4234ca312ca13fc860b8cd0ca923b2cb

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 by locating the TaskResponse schema and the api.json/OpenAPI definition exposed by the documentation. Reproduce the response by syncing a repository with a bad URL, then verify that the documented error mapping treats traceback and description values as strings.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend-api-design
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.