Skip to content

APIv2: When /images/search fails do not return null #5228

@marusak

Description

@marusak

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description
When /images/search fails, the respons also contains null (as no images found), however the reply is then not a valid JSON and is difficult to parse. Since code 200 means that the request succeeded, there is no need to try to show that there are not images.

Steps to reproduce the issue:

1.sudo curl --unix-socket /run/podman/podman.sock http://d/v1.24/libpod/images/search?term=fed%3A

Describe the results you received:

{"cause":"invalid reference format","message":"error getting registry from \"fed:\": invalid reference format","response":500}
null

Describe the results you expected:

{"cause":"invalid reference format","message":"error getting registry from \"fed:\": invalid reference format","response":500}

Using my own local build of current upstream.

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions