FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

get datasets / package download fail to parse response: unknown variant table_formatted_word_ids · Issue #451 · reinfer/cli · GitHub

/ cli Public

get datasets / package download fail to parse response: unknown variant table_formatted_word_ids #451

Description

Summary:

Against a current UiPath IXP tenant, the client fails to deserialize the dataset response because the backend now returns an attribution_method value (table_formatted_word_ids) that the AttributionMethod enum doesn't include. This breaks every command that fetches a dataset — get datasets, package download, and package upload — making the CLI unusable for these workflows.

Version

  • reinfer-cli 0.41.0 (current crates.io release)
  • Also present on current main (checked at commit a4657cf) — the enum still only defines table_heuristic and word_ids.

Steps to reproduce
re -c <ctx> get datasets

or

re -c <ctx> package download "<owner>/<dataset>" --file out.zip

Actual result

E An error occurred:
E  |- Operation to list datasets has failed.
E  |- Could not parse JSON response.
E  |- unknown variant `table_formatted_word_ids`, expected `table_heuristic` or `word_ids`

Root cause

api/src/resources/dataset.rs:

#[serde(rename_all = "snake_case")]
pub enum AttributionMethod {
    #[default]
    TableHeuristic,
    WordIds,
}

The backend emits a third value, table_formatted_word_ids, which has no matching variant, so serde deserialization fails.

Suggested fix

Add the missing variant so it round-trips correctly:

#[serde(rename_all = "snake_case")]
pub enum AttributionMethod {
    #[default]
    TableHeuristic,
    WordIds,
    TableFormattedWordIds,
}

(Verified: building with this variant added lets get datasets and package download/upload work end-to-end against the affected tenant.)

Optionally, consider a #[serde(other)] catch-all variant to make the client resilient to future backend-added values, though the explicit variant is needed for correct re-serialization on package upload.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL