Fix Bug: Sandbox onboarding ignores API validation errors and shows generic failure message#10869
Fix Bug: Sandbox onboarding ignores API validation errors and shows generic failure message#10869biisal wants to merge 5 commits intopolarsource:mainfrom
Conversation
sebastianekstrom
left a comment
There was a problem hiding this comment.
Thanks for fixing this!
|
@biisal could you please adress the formatting issues reported by the CI? Thank you! |
…e file exclusions in settings
Head branch was pushed to by a user without write access
|
Fixed! Should be good to go now 😊 |
|
@biisal Thanks! Could you also revert the changes to |
|
@sebastianekstrom Actually, those files were getting hidden in the sidebar for me (and other VS Code forks), which made it pretty difficult to navigate the project while working from the root folder. I commented them out to make development easier, but should I revert this? If there's a specific reason for hiding the server, clients, and docs folders in the workspace config, I'm happy to move these settings to my local user profile instead |
📋 Summary
Related Issue: Fixes #10868
Improves error handling when creating a sandbox organization by parsing and displaying specific API validation errors instead of a static fallback message.
🎯 What
createError.detail.msg) and direct string errors from the API.🤔 Why
Previously, if sandbox organization creation failed (for example, due to a taken slug or other API validation errors), the user would only see a generic "Failed to create organization. Please try again" message. This change ensures that any specific API validation errors are properly passed through and displayed to the user, making it much easier for them to understand what went wrong and fix it without getting stuck.
🔧 How
onSubmithandler ofSandboxStep.tsx, updated theif (createError)block.createError?.detailis an array (taking the firstmsgproperty) or a string.setErrorstate updater so it renders correctly in theSubmitButton.🧪 Testing
uv run task testfor backend,pnpm testfor frontend)uv run task lint && uv run task lint_typesfor backend)Test Instructions
pnpm run devinclients/apps/web)./onboarding/sandbox).🖼️ Screenshots/Recordings
Before changes


After Changes
📝 Additional Notes
✅ Pre-submission Checklist