Skip to content

list projects fails with "error decoding response body" #29

Description

@saramaebee

What

fossapi list projects fails with a deserialization error against the
real /api/projects endpoint:

$ fossapi list projects --json --count 1
Error: HTTP error: error decoding response body

The same key works fine for get project <locator>, get revision <locator>, and a direct curl against /api/projects?count=1 returns
valid JSON — so the response itself is well-formed. Only fossapi's
response struct is intolerant of something in it.

Suggested fix

  • Make the response struct tolerant of unknown / nullable fields
    (#[serde(default)], Option<T>).
  • If repro is hard to set up, comparing the live /api/projects JSON
    shape against the struct definition should surface the offending
    field(s).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions