korbit-ai[bot] commented on code in PR #31969:
URL: https://github.com/apache/superset/pull/31969#discussion_r1926493173
##########
superset-frontend/src/features/tags/tags.ts:
##########
@@ -194,10 +194,7 @@ export function fetchObjects(
}
export function fetchObjectsByTagIds(
- {
- tagIds = [],
- types,
- }: { tagIds: number[] | undefined; types: string | null },
+ { tagIds = [], types }: { tagIds: number[] | string; types: string | null },
Review Comment:
### Inconsistent tagIds parameter type <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
The tagIds parameter type accepts both number[] and string, which can lead
to inconsistent API behavior since the endpoint expects a specific format.
###### Why this matters
If a string is passed for tagIds, it might not be properly formatted for the
API endpoint, potentially causing runtime errors or unexpected behavior when
fetching objects.
###### Suggested change ∙ *Feature Preview*
Standardize the tagIds parameter to only accept number[] and handle any
string to number[] conversion before calling this function:
```typescript
{ tagIds: number[]; types: string | null }
```
</details>
<sub>💡 Does this comment miss the mark? [Tell us
why](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/77ff6db6-c2bf-43c9-a9eb-7bdf6aad4406?suggestedFixEnabled=true)
and Korbit will adapt to your team’s feedback.
💬 Chat with Korbit by mentioning @korbit-ai.
</sub>
<!--- korbi internal id:eaf9ca76-27e9-41c7-bd91-98c39195dffd -->
--
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]