Skip to content

Fix- 1036 - path paramter endpoint save failure#1057

Open
ruwinirathnamalala wants to merge 3 commits into
buerokratt:devfrom
rootcodelabs:fix/1036/path_paramter_endpoint
Open

Fix- 1036 - path paramter endpoint save failure#1057
ruwinirathnamalala wants to merge 3 commits into
buerokratt:devfrom
rootcodelabs:fix/1036/path_paramter_endpoint

Conversation

@ruwinirathnamalala
Copy link
Copy Markdown
Collaborator

This pull request refines how endpoint URLs and parameters are constructed before making API requests. The main change is improved handling of path and query parameters, ensuring that path parameters are correctly encoded into the URL and that only query parameters are included in the params object. This makes the request construction more robust and accurate.

Improvements to endpoint request construction:

  • Path parameters are now detected and safely encoded directly into the URL, replacing placeholders with their actual values.
  • Query parameters are separated from path parameters and are the only ones included in the params object sent with the request.
  • The code now avoids including undefined or empty path parameter values, improving request reliability.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 4, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

edges: JSON.parse(JSON.stringify(nextState.edges)),
historyIndex: historyIndex + 1,
hasUnsavedChanges: true,
});
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The structuredClone approach failed with DataCloneError because flow nodes contain function references (onDelete, onEdit, setClickedNode, update), which cannot be cloned by the structured clone algorithm. The JSON.parse(JSON.stringify()) method is used here to strip functions from nodes before saving to history, which are then manually re-attached during undo/redo operations.
Therefore, ignore the Sonar issue warning in the PR

@matKlju matKlju linked an issue Jun 5, 2026 that may be closed by this pull request
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.

[BUG] Path Parameter Endpoints Fail After Save

1 participant