Skip to content

Validate maxCount query parameter in search stops endpoint #771

@jeyamoorthi

Description

@jeyamoorthi

Problem

The maxCount query parameter is parsed using strconv.Atoi, but errors are ignored.

Current Behavior

Invalid values (e.g., maxCount=abc) silently fall back to default (50).

Expected Behavior

The API should return a 400 Bad Request when invalid input is provided.

Proposed Fix

Add validation to ensure maxCount is a positive integer and return an error response otherwise.

Impact

Improves API correctness and prevents silent failures.

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