fix: handle object-form ipBlocks in routeplanner status - #237
Merged
Merged
Conversation
|
All Contributors have signed the CLA. The PR is now allowed to be merged. |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
performanc-bot
added a commit
to PerformanC/CLA-Signatures
that referenced
this pull request
Sep 15, 2026
1Lucas1apk
requested changes
Sep 15, 2026
snakkeeh
commented
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Fixed
GET /v4/routeplanner/statuscrashing withTypeError: ipBlocks[0]?.includes is not a functionwhen route planneripBlocksare configured as{ cidr }objects (which the canonical configtype allows). Added a
getFirstBlockCidr()resolver that accepts stringentries,
{ cidr }objects, and missing/empty config, and made theendpoint's local
ipBlockstype matchArray<string | { cidr: string }>.Mirrored the fix in
dist/src/api/routeplanner.jssince dist is tracked.Why
The endpoint's local type (
ipBlocks: string[]) disagreed with the realconfig type, so any object-form block config (valid per types, migration,
and route planner manager normalization) took down the status route with a
500 instead of returning the Lavalink-compatible payload.
Checkmarks
Additional information
Verified with a temporary
node:testsuite (deleted before commit): stringblocks ->
Inet4Address, object blocks ->Inet6Addresswith no throw,missing
ipBlocks-> defaults safely.tsc --noEmitpasses. Commit followsrepo convention (
fix: ..., <=72 chars, no scope, no trailing period).