-
Notifications
You must be signed in to change notification settings - Fork 13
Support some commands offline #1237
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
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’ve left a comment, but feel free to decide whether you want to make any changes or not
@@ -68,6 +68,9 @@ func prettyError(err error) error { | |||
term.Debug("Server error:", cerr) | |||
err = errors.Unwrap(cerr) | |||
} | |||
if cli.IsNetworkError(err) { | |||
return fmt.Errorf("%w; please check network settings and try again", err) |
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.
Right now it appears as:
Error: dial tcp: lookup fabric-prod1.defang.dev: no such host; please check network settings and try again
I'm a bit inclined to show the friendlier message unable to connect to Defang server %q; please check network settings and try again
to the user instead of the raw error for simplicity, but this is just a matter of personal preference.
Otherwise, looks good to me.
Description
When offline (on a plane), we should allow commands that don't require login, like
defang compose config
.Linked Issues
See #1111
Checklist