Skip to content

fix: batch Nikshay villages request to avoid oversized GET query string - #161

Merged
snehar-nd merged 1 commit into
release-3.8.2from
vb/relse-3.8.2-village-fix
Sep 9, 2026
Merged

fix: batch Nikshay villages request to avoid oversized GET query string#161
snehar-nd merged 1 commit into
release-3.8.2from
vb/relse-3.8.2-village-fix

Conversation

@vishwab1

@vishwab1 vishwab1 commented Sep 9, 2026

Copy link
Copy Markdown
Member

Selecting all facilities across multiple Nikshay TUs (e.g. a full district) could push 1000+ facility IDs into a single comma-separated GET query string, exceeding the ~8KB request-line limit enforced by proxies/Tomcat and causing a 400 before the request ever reached the controller (observed as a 400/OK Http failure on
/nikshay/location/villages).

getNikshayVillages now splits facilityIDs into batches of 200, fetches them in parallel via forkJoin, and merges the responses into the same { data: [...] } shape callers already expect, so no changes were needed at either call site in work-location-mapping.component.ts.

📋 Description

JIRA ID:

Please provide a summary of the change and the motivation behind it. Include relevant context and details.


✅ Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)
  • New feature (non-breaking change which adds functionality)
  • 🔥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🛠 Refactor (change that is neither a fix nor a new feature)
  • ⚙️ Config change (configuration file or build script updates)
  • 📚 Documentation (updates to docs or readme)
  • 🧪 Tests (adding new or updating existing tests)
  • 🎨 UI/UX (changes that affect the user interface)
  • 🚀 Performance (improves performance)
  • 🧹 Chore (miscellaneous changes that don't modify src or test files)

ℹ️ Additional Information

Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.

Selecting all facilities across multiple Nikshay TUs (e.g. a full
district) could push 1000+ facility IDs into a single comma-separated
GET query string, exceeding the ~8KB request-line limit enforced by
proxies/Tomcat and causing a 400 before the request ever reached the
controller (observed as a 400/OK Http failure on
/nikshay/location/villages).

getNikshayVillages now splits facilityIDs into batches of 200,
fetches them in parallel via forkJoin, and merges the responses into
the same { data: [...] } shape callers already expect, so no changes
were needed at either call site in work-location-mapping.component.ts.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: a5a70ad9-865c-4d40-81b4-e9a80eaa1895

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Sep 9, 2026

Copy link
Copy Markdown

@snehar-nd
snehar-nd merged commit 5712b6c into release-3.8.2 Sep 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants