Closed bttf closed 1 year ago
This is definitely an improvement.
I think we can make this error page a lot smarter. Right now, we always show the API Host and Key inputs, even when the error has nothing to do with them. This may confuse users, no matter how helpful we make the error message.
The issue is that we're doing a complex API call that may fail for a number of different reasons (bad API Host, bad API Key, mangled querystring, CSP errors, etc.). It's hard to figure out exactly why it failed.
If we think of the connection as multiple steps, we can provide really clear feedback to the user about exactly when and why something went wrong.
We can show check marks for each step as they complete. And we can be smart about which inputs we show. For example, if we're able to connect to the API, but the Authentication fails, we don't have to show the API Host input anymore, just the API Key input.
Prior to this change, we were only reporting a generic 'Please check your API Key and host' message for any error that occurred when establishing connection between the visual editor and growthbook API.
Now we are relaying the error message generated by the network request which should be more helpful in troubleshooting
Matt's query params issue from earlier (now reports error specific to api-host query param)
Wrong hostname error ('failed to fetch')