fix(chat): simplified error message coming from Cloudflare when using a VPN #7343
+118
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refs CODY-5032 improve error messages
Up to this point we were replying with a full blown html file all inside of an error box.
We now simplify the error message to make it easier for users to understand why they get a forbidden message from Cloudflare when they have a VPN enabled.
! I also removed the URL with the endpoint since this was something that was flagged in the ticket, replacing it
with simply "Sourcegraph".
I expect some need for tweaks both for this choice and for the message to be asked, to be changed if requested
as part of ticket review.
Test plan
Use a VPN and try to make a chat. Notice the difference in reply from receving
a full blown html page inside an error box to getting a simple error message.
Here is the end result that we would show to the user:
