Skip to content

Listeners and connectors tab is disabled in mock mode #600

Description

@pierpman

Describe the bug
In mock mode (yarn start), the Listeners and Connectors tab on a Service detail page is disabled. The mock handlers for getListeners and getConnectors return { results: [], count: 0 } when limit=0 is included in the request. This does not affect real API calls.

To Reproduce

  1. Start the dev server in mock mode: yarn start (without a real OBSERVER_URL)
  2. Navigate to a Service detail page (e.g. paymentservice)
  3. The Listeners or Connectors tab is disabled

Expected behavior
Listeners and connectors matching the serviceId filter should be returned regardless of whether limit=0 is present in the query string.

Screenshots
Image

Browser:

  • All browsers

Additional context
The bug is in the mock server only (mocks/server.API.ts). The getListeners and getConnectors handlers pass the raw queryParams object (i.e. { limit: '0', serviceId: 'adr-...' }) directly to filterResults. Since listener and connector records have no limit field, resultValue resolves to undefined and every record is dropped by the filter.

Affected mock intercept (does not reproduce against a real API):

GET /api/v2alpha1/listeners?serviceId=<id>&limit=0
GET /api/v2alpha1/connectors?serviceId=<id>&limit=0

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions