diff --git a/.vscode/launch.json b/.vscode/launch.json index c7669ea..12955e8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,7 +4,7 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ - { + /* { "name": "Launch Package", "type": "go", "request": "launch", @@ -15,7 +15,7 @@ "envFile": "${workspaceFolder}/.env", //"args": ["-datadir", "/home/vlad/.peerswap_t4"] //"args": ["-datadir", "/home/vlad/.peerswap3"] - },/* + }, */ // sudo bash -c 'echo 0 > /proc/sys/kernel/yama/ptrace_scope' // go install -tags cln -gcflags 'all=-N -l' ./cmd/psweb // lcli -k plugin subcommand=stop plugin=/home/vlad/go/bin/psweb diff --git a/cmd/psweb/main.go b/cmd/psweb/main.go index 8ee035d..3a96cdf 100644 --- a/cmd/psweb/main.go +++ b/cmd/psweb/main.go @@ -260,14 +260,14 @@ func redirectWithError(w http.ResponseWriter, r *http.Request, redirectUrl strin // translate common errors into plain English switch { case strings.HasPrefix(t, "rpc error: code = Unavailable desc = connection error"): - t = "Peerswapd has not started listening yet. Check log." + t = "Peerswapd has not started listening yet. Check logs." redirectUrl = "/log?" case strings.HasPrefix(t, "-1:peerswap is still in the process of starting up"): - t = "Peerswap is still in the process of starting up. Check log." - redirectUrl = "/log?log=cln.log" + t = "Peerswap is still in the process of starting up. Check logs." + redirectUrl = "/log?log=cln.log&" case strings.HasPrefix(t, "Unable to dial socket"): - t = "Lightningd has not started listening yet. Check log." - redirectUrl = "/log?log=cln.log" + t = "Lightningd has not started listening yet. Check logs." + redirectUrl = "/log?log=cln.log&" case strings.HasPrefix(t, "rpc error: code = "): i := strings.Index(t, "desc =") if i > 0 {