Description
Problem
The getTrends endpoint silently falls back to the default daily range whenever an unsupported range value is provided.
This behavior hides client-side mistakes and makes debugging more difficult because invalid requests still return successful responses.
Proposed Solution
- Validate the
range query parameter.
- Accept only
daily, weekly, and monthly.
- Return HTTP 400 Bad Request for unsupported values.
- Include a clear validation message listing the supported range values.
- Remove the silent fallback behavior.
Benefits
- Improves API validation.
- Makes debugging easier.
- Prevents unintended analytics results.
Description
Problem
The
getTrendsendpoint silently falls back to the defaultdailyrange whenever an unsupported range value is provided.This behavior hides client-side mistakes and makes debugging more difficult because invalid requests still return successful responses.
Proposed Solution
rangequery parameter.daily,weekly, andmonthly.Benefits