diff --git a/pitr/cli/internal/pkg/agent-server.go b/pitr/cli/internal/pkg/agent-server.go index 5ba5d1f3..9e61aac3 100644 --- a/pitr/cli/internal/pkg/agent-server.go +++ b/pitr/cli/internal/pkg/agent-server.go @@ -81,6 +81,10 @@ func (as *agentServer) CheckStatus(in *model.HealthCheckIn) error { return xerr.NewUnknownErr(url, in, nil, err) } + if out.Code != 0 { + return xerr.NewAgentServerErr(out.Code, out.Msg) + } + return nil }