Skip to content

## Enhancement: Validate and Handle Invalid Brand/Type Query Parameters in CatalogSearch.razor #895

@nithyav2017

Description

@nithyav2017

Description

In the CatalogSearch.razor component, users navigate by clicking on catalog brand or type items, which redirects them to the search page with query parameters (e.g., ?brand=3&type=2). However, if a user manually modifies the URL to include invalid values like brand=-1 or type=-1, the component does not display an error or fallback behavior. This can lead to silent failures or empty search results.

Motivation

While the UI prevents invalid selections by design, users can still enter malformed URLs directly. Adding validation for these parameters would improve robustness and user experience, especially in edge cases or deep-linking scenarios.

Suggested Improvement

  • Detect invalid values (-1) in query parameters during component initialization.
  • Display a user-friendly message or reset to default filters.
  • Optionally log or track invalid parameter usage for diagnostics.

.

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