Skip to content

Commit 08c0808

Browse files
committed
fix: correct target path mapping
1 parent 6038e6e commit 08c0808

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/handlers/handlerUtils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,15 +771,14 @@ export async function tryTargetsRecursively(
771771
case StrategyModes.FALLBACK:
772772
for (const [index, target] of currentTarget.targets.entries()) {
773773
const originalIndex = target.originalIndex || index;
774-
currentJsonPath = `${currentJsonPath}.targets[${originalIndex}]`;
775774
response = await tryTargetsRecursively(
776775
c,
777776
target,
778777
request,
779778
requestHeaders,
780779
fn,
781780
method,
782-
currentJsonPath,
781+
`${currentJsonPath}.targets[${originalIndex}]`,
783782
currentInheritedConfig
784783
);
785784
if (response?.headers.get('x-portkey-gateway-exception') === 'true') {

0 commit comments

Comments
 (0)