Skip to content
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

Handle network errors with better messaging #519

Merged
merged 5 commits into from
Dec 13, 2024
Merged

Handle network errors with better messaging #519

merged 5 commits into from
Dec 13, 2024

Conversation

ecooper
Copy link

@ecooper ecooper commented Dec 12, 2024

Problem

When a network error occurs in the v10 driver, we get a "The network encountered a problem" message. If fetch fails, you get a "fetch failed". Neither of these are helpful.

Solution

Catch them with slightly better messaging and centralize the messaging so we are consistent in the places we need to handle these errors. Given the most likely cause of a network error is --local, add a blurb about that too.

All commands are covered by this messaging, but may display them differently depending on their error handling.

Result

Screenshot 2024-12-12 at 11 17 57 AM

Testing

Unit tests.

Copy link
Contributor

@jrodewig jrodewig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Left some message nits you can take or leave as you see fit.

@ecooper ecooper merged commit c963ec9 into v3 Dec 13, 2024
4 checks passed
@ecooper ecooper deleted the v3-local-errors branch December 13, 2024 00:42
@cleve-fauna cleve-fauna mentioned this pull request Dec 13, 2024
@wildemat wildemat mentioned this pull request Dec 18, 2024
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.

3 participants