Skip to content

CLI db list returns null in JSON mode instead of empty array #459

@poyrazK

Description

@poyrazK

Why is this an issue?

When there are no database instances, cloud db list returns null in JSON mode (-j flag) instead of an empty array []. This breaks JSON parsing for any client consuming the CLI output programmatically.

What is causing it?

The API returns null (or no data) when there are no DB instances, and the SDK passes it through as-is.

How can it be solved?

The API should return an empty array [] when there are no results, not null.

Category

  • Small
  • Medium
  • Large

Severity

  • Low
  • Medium
  • High
  • Critical

Steps to reproduce

cloud db list -j
# Output: null
# Expected: []

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions