diff --git a/cmd/shared.go b/cmd/shared.go index a7a70e8c..e3c7a2b1 100644 --- a/cmd/shared.go +++ b/cmd/shared.go @@ -62,7 +62,7 @@ func (app *SharedFlags) InitSharedFlags() { func (app *SharedFlags) SetFlags(fs *flag.FlagSet) { fs.StringVar(&app.ConfigurationFile, "use-configuration", app.ConfigurationFile, "Specifies the configuration to use") fs.StringVar(&app.Server, "server", app.Server, "Immich server address (http://:2283 or https://)") - fs.StringVar(&app.API, "api", "", "Immich api endpoint (http://container_ip:3301)") + fs.StringVar(&app.API, "api", app.API, "Immich api endpoint (http://container_ip:3301)") fs.StringVar(&app.Key, "key", app.Key, "API Key") fs.StringVar(&app.DeviceUUID, "device-uuid", app.DeviceUUID, "Set a device UUID") fs.StringVar(&app.LogLevel, "log-level", app.LogLevel, "Log level (DEBUG|INFO|WARN|ERROR), default INFO") diff --git a/docs/releases.md b/docs/releases.md index 3c0643b8..5d01f703 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -1,5 +1,12 @@ # Release notes +### fix: [#317](https://github.com/simulot/immich-go/issues/317) +When the server doesn't reply as expected, the message is now explicit: +``` +the ping API end point doesn't respond at this address: http://localhost:2283/api/server-info/ping +``` + + ### feat: Server's activity graph The UI mode now show the current activity of the immich server. After 10 seconds of zero activity, the program stops diff --git a/immich/client.go b/immich/client.go index 630fa8e2..cba15258 100644 --- a/immich/client.go +++ b/immich/client.go @@ -109,7 +109,7 @@ func (ic *ImmichClient) PingServer(ctx context.Context) error { r := PingResponse{} err := ic.newServerCall(ctx, "PingServer").do(get("/server-info/ping", setAcceptJSON()), responseJSON(&r)) if err != nil { - return err + return fmt.Errorf("the ping API end point doesn't respond at this address: %s", ic.endPoint+"/server-info/ping") } if r.Res != "pong" { return fmt.Errorf("incorrect ping response: %s", r.Res)