-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore: better codesandbox error #9273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Build successful! 🎉 |
| ToastQueue.negative('Failed to create CodeSandbox, make sure you are logged in to CodeSandbox. If you are already logged in, logout and log back in.'); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of like the idea of this being a Dialog. It's less harsh and there's more room to to explain what the user needs to do. And the primary action could do another check (with pending state) and open the link if it passes.
reidbarber
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! One comment
|
This appears to be a non-viable solution. When we use the form approach the users authentication cookies are included because it's the same domain. When I try to use the fetch, I can't include the auth because it's cross-origin. I could try loading an hidden iframe of codesandbox potentially and if it loads vs errors, we might be able to determine if the user is logged in, but even that may not work. I think we should provide more info in a dialog that opens to confirm that you mean to leave the page though, that's the simplest solution, though does require one more click. |
Closes
Unauthenticated users cannot create a devbox, this attempts to create it and then provide a better error message if the creation of the sandbox failed.
I haven't figured out the happy path quite yet.
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: