fix #507 #509
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "Apfelwurm/abra:own/fix_addserver"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This fixes the error output when using abra add server, so it actually returns the relevant exception message. Created with the help of @P4u1
And since i did not write anything on my last PR:
Hey all, i'm Alex and i'm one of the members of Klasse & Methode :)
Great stuff, thanks @Apfelwurm 🎉
@ -89,7 +89,7 @@ func New(serverName string, opts ...Opt) (*client.Client, error) {
info, err := cl.Info(context.Background())
if err != nil {
return cl, sshPkg.Fatal(serverName, err)
Is
sshPkg.Fatal
used anywhere else and/or should it be removed?It is still also in use in https://git.coopcloud.tech/toolshed/abra/src/branch/main/cli/server/add.go#L106 :)
Sorry, to look at this again, is it not the problem that repeatedly saying "try ssh'ing to the server" is confusing when that does indeed work #507 (comment)
What
sshPkg.Fatal
is trying to do is "route" error messages so that what is given back to the user is very specific and isnot a "wall of text"
So, for me, the ideal situation would be to handle "Unknown command: docker" (see #507 logs) with a specific error messages, aka "are you sure Docker is installed / your user has the permissions"?
We could also additionally match for "please make sure the URL is valid, and Docker 18.09 or later is installed on the remote host" to give a similar warning.
sshPkg.Fatal
was implemented specifically to help people get better feedback based on many issues raised over the years on this connection situation, which often effects beginners disproportionately.I would normally be up for merging stuff and seeing how it goes but I've noticed that changes around error message handling which is given directly to users needs to be handled very carefully or can result in
$more
issue reports and growing frustration.Let me know what you think @Apfelwurm and thanks again!
@decentral1se I think this pull request is doing what you wrote in you last message
To improve error handling in general I create a new pr with a proof of concept for errors with help messages: #512
@p4u1 @Apfelwurm
Just to share what was discussed elsewhere:
@p4u1 and myself agreed that I can come up with an adjusted fix for this.
Coming Soon ™
Pull request closed