From 301e2fde1a6e462b2ea4d46669968199b03980ff Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Thu, 25 May 2023 11:04:30 +0000 Subject: [PATCH] fix: set internal error on module scp connection refused --- pew.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pew.go b/pew.go index 76691bb..ccc3083 100644 --- a/pew.go +++ b/pew.go @@ -493,6 +493,10 @@ func copyArtifactAndTest(slog zerolog.Logger, q *qemu.System, ka config.Artifact res.Run.Output, err = q.CopyAndInsmod(res.BuildArtifact) if err != nil { slog.Error().Err(err).Msg(res.Run.Output) + // TODO errors.As + if strings.Contains(err.Error(), "connection refused") { + res.InternalError = err + } return } res.Run.Ok = true