Skip to content

fix: validate dataset name and columns before submission#122

Open
balasiddarthan22 wants to merge 1 commit into
tinyfish-io:mainfrom
balasiddarthan22:fix/validate-dataset-form-v2
Open

fix: validate dataset name and columns before submission#122
balasiddarthan22 wants to merge 1 commit into
tinyfish-io:mainfrom
balasiddarthan22:fix/validate-dataset-form-v2

Conversation

@balasiddarthan22
Copy link
Copy Markdown

Submitting with an empty name or zero columns reached the backend and returned a cryptic 'Invalid request' error. Now caught on the client with a clear message before the API call is made.

Submitting with an empty name or zero columns reached the backend
and returned a cryptic 'Invalid request' error. Now caught on the
client with a clear message before the API call is made.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: afb5eda1-27f5-469a-8268-ffdc2696f01c

📥 Commits

Reviewing files that changed from the base of the PR and between 5a2e7c3 and a82709d.

📒 Files selected for processing (1)
  • frontend/app/dataset/new/page.tsx

📝 Walkthrough

Walkthrough

This PR adds pre-flight validation to the dataset creation flow. When a user clicks "Confirm" to create a dataset, the handleConfirm function now checks that the dataset name is not empty and that at least one column has been defined. If either check fails, the function displays an error message and returns early without attempting to call the backend mutation. The changes are localized to the event handler and do not modify the component's state management or API contract.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding validation for dataset name and columns before submission.
Description check ✅ Passed The description is directly related to the changeset, explaining the problem (empty submission reaching backend with cryptic error) and the solution (client-side validation with clear messages).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant