bito-code-review[bot] commented on code in PR #38069:
URL: https://github.com/apache/superset/pull/38069#discussion_r2822519903
##########
superset-frontend/packages/superset-ui-core/test/connection/SupersetClientClass.test.ts:
##########
@@ -696,7 +696,7 @@ describe('SupersetClientClass', () => {
client = new SupersetClientClass({ protocol, host, guestToken });
await client.init();
- await client.postForm(mockPostFormUrl, {});
+ await client.postForm({ endpoint: mockPostFormUrl, payload: {} });
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Incorrect postForm parameter</b></div>
<div id="fix">
The postForm call uses 'endpoint' with a full URL value, but should use
'url' to avoid incorrect URL construction. Since mockPostFormUrl is already a
full URL, passing it as 'endpoint' causes getUrl to treat it as a path and
construct an invalid URL.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
````suggestion
await client.postForm({ url: mockPostFormUrl, payload: {} });
````
</div>
</details>
</div>
<small><i>Code Review Run #539b61</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]