Skip to content

Fix: Use default configured URL for Flowise engine client requests - #439

Open
omar67 wants to merge 2 commits into
di-sukharev:masterfrom
omar67:master
Open

omar67 wants to merge 2 commits into
di-sukharev:masterfrom
omar67:master

Conversation

@omar67

@omar67 omar67 commented Dec 24, 2024

Copy link
Copy Markdown

🛠️ Fixing the Way to Flowise 🛤️

This PR ensures we're no longer shooting blind when sending requests to the Flowise engine. Instead of relying on an empty string ("") for the URL, we're now using the default configured URL already baked into the client (this.client.defaults.url). Why reinvent the wheel, right? 🚗

What Changed?

  • Updated this.client.post("", payload)
  • To the much smarter this.client.post(this.client.defaults.url, payload)

Why?

Because "empty string engineering" is not exactly best practice (or fun during debugging). Now requests follow the default road map as intended! 🎯

@di-sukharev
di-sukharev changed the base branch from master to dev January 20, 2025 10:05
@di-sukharev
di-sukharev changed the base branch from dev to master January 20, 2025 10:05
@di-sukharev

Copy link
Copy Markdown
Owner

@omar67 dude, you've made changes to /out dir, which is the built src dir, please make change in src, code inside /out is generated automatically

@omar67

omar67 commented Jan 28, 2025

Copy link
Copy Markdown
Author

😅 Oops, my bad!

@di-sukharev di-sukharev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The empty URL problem is real, but this PR is far behind master, and the resulting file does not pass Prettier. After rebasing, please add a unit test that intercepts the Axios request and verifies the full URL. It would be preferable to configure baseURL or url explicitly on the instance instead of passing the engine config into Axios getUri.

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